This website is for Vega-Lite v3. Go to the main Vega-Lite homepage for the latest release.

Tukey Box Plot (1.5 IQR)

A vertical 2D box plot showing median, min, and max in the US population distribution of age groups in 2000.

View this example in the online editor

Vega-Lite JSON Specification

{
  "$schema": "https://vega.github.io/schema/vega-lite/v3.json",
  "description": "A vertical 2D box plot showing median, min, and max in the US population distribution of age groups in 2000.",
  "data": {"url": "data/population.json"},
  "mark": {
    "type": "boxplot",
    "extent": 1.5
  },
  "encoding": {
    "x": {"field": "age", "type": "ordinal"},
    "y": {
      "field": "people",
      "type": "quantitative",
      "axis": {"title": "population"}
    },
    "size": {"value": 5}
  }
}