{ "$schema": "https://vega.github.io/schema/vega-lite/v4.json", "description": "Scatterplot matrix", "repeat": { "column": [ "Miles_per_Gallon", "Acceleration", "Horsepower" ], "row": [ "Horsepower", "Acceleration", "Miles_per_Gallon" ] }, "spec": { "data": { "url": "https://vega.github.io/vega-lite/data/cars.json" }, "encoding": { "color": { "condition": { "field": "Origin", "selection": "myBrush", "type": "nominal" }, "value": "grey" }, "x": { "field": { "repeat": "column" }, "type": "quantitative" }, "y": { "field": { "repeat": "row" }, "type": "quantitative" } }, "mark": "point", "selection": { "grid": { "bind": "scales", "resolve": "global", "translate": "[mousedown[!event.shiftKey], window:mouseup] > window:mousemove!", "type": "interval", "zoom": "wheel![event.shiftKey]" }, "myBrush": { "on": "[mousedown[event.shiftKey], window:mouseup] > window:mousemove!", "resolve": "union", "translate": "[mousedown[event.shiftKey], window:mouseup] > window:mousemove!", "type": "interval", "zoom": "wheel![event.shiftKey]" } } } }