Skip to content
Vega-Lite templates

Jittered Strip Plot

Individual values per group with horizontal jitter — see distribution + outliers.

Template previewVega-Lite
Rendering…

Make it your own.

{
  "$schema":"https://vega.github.io/schema/vega-lite/v5.json",
  "data":{"values":[
    {"g":"A","v":3.1},{"g":"A","v":3.4},{"g":"A","v":2.8},{"g":"A","v":3.0},{"g":"A","v":3.6},
    {"g":"B","v":4.0},{"g":"B","v":4.2},{"g":"B","v":4.7},{"g":"B","v":5.0},{"g":"B","v":3.8},
    {"g":"C","v":2.0},{"g":"C","v":2.4},{"g":"C","v":1.7},{"g":"C","v":2.6},{"g":"C","v":2.8}
  ]},
  "transform":[{"calculate":"random()-0.5","as":"j"}],
  "mark":{"type":"point","filled":true,"size":80,"opacity":0.75},
  "encoding":{
    "x":{"field":"g","type":"nominal","title":""},
    "xOffset":{"field":"j","type":"quantitative","scale":{"domain":[-0.5,0.5]}},
    "y":{"field":"v","type":"quantitative","title":"Value"},
    "color":{"field":"g","type":"nominal","legend":null}
  },
  "width":360,"height":280
}