Scatter Chart (Vega-Lite)
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"title": "Scatter with Size and Shape",
"width": 300,
"height": 200,
"data": {
"values": [
{"x": 1, "y": 28, "size": 100, "cat": "A"},
{"x": 2, "y": 55, "size": 200, "cat": "B"},
{"x": 3, "y": 43, "size": 150, "cat": "A"},
{"x": 4, "y": 91, "size": 300, "cat": "B"},
{"x": 5, "y": 81, "size": 120, "cat": "A"},
{"x": 6, "y": 53, "size": 250, "cat": "B"}
]
},
"mark": "point",
"encoding": {
"x": {"field": "x", "type": "quantitative"},
"y": {"field": "y", "type": "quantitative"},
"size": {"field": "size", "type": "quantitative"},
"shape": {"field": "cat", "type": "nominal"},
"color": {"field": "cat", "type": "nominal"}
}
}