Follow ______ on twitter.

2.3.5 Box Plots

Code

Vega-Lite Chart

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "A box plot showing the distribution of values by category.",
  "width": 300,
  "height": 200,
  "data": {
    "values": [
      {
        "category": "A",
        "value": 3
      },
      {
        "category": "A",
        "value": 5
      },
      {
        "category": "A",
        "value": 7
      },
      {
        "category": "A",
        "value": 2
      },
      {
        "category": "A",
        "value": 4
      },
      {
        "category": "B",
        "value": 6
      },
      {
        "category": "B",
        "value": 8
      },
      {
        "category": "B",
        "value": 5
      },
      {
        "category": "B",
        "value": 9
      },
      {
        "category": "B",
        "value": 7
      },
      {
        "category": "C",
        "value": 4
      },
      {
        "category": "C",
        "value": 6
      },
      {
        "category": "C",
        "value": 3
      },
      {
        "category": "C",
        "value": 7
      },
      {
        "category": "C",
        "value": 5
      }
    ]
  },
  "mark": "boxplot",
  "encoding": {
    "x": {
      "field": "category",
      "type": "nominal",
      "axis": {
        "title": "Category"
      }
    },
    "y": {
      "field": "value",
      "type": "quantitative",
      "axis": {
        "title": "Value"
      }
    },
    "size": {
      "value": 50
    }
  }
}