Auto mark, heatmap

Given two quantitative dimensions for x and y, the auto mark will create a heatmap from the binned values.

Plot.auto(olympians, {x: "weight", y: "height", color: "count"}).plot()

Given a quantitative dimension for x and an ordinal dimension for y, the auto mark will create a heatmap from the binned x values, grouped by y.

Plot.auto(olympians, {x: "weight", y: "sex", color: "count"}).plot()

This auto mark is equivalent to a rect & bin combination:

Plot.rect(olympians, Plot.bin({fill: "count"}, {x: "weight", y: "height"})).plot()
Plot.rect(olympians, Plot.binX({fill: "count"}, {x: "weight", y: "sex"})).plot()
const olympians = FileAttachment("data/olympians.csv").csv({typed: true}).then(display);
✎ Suggest changes to this page