Open
Description
As an approximation:
Plot.plot({
marks: [
Plot.ruleX(data, Plot.binX({y1: loqr1, y2: hiqr2}, {x, y})),
Plot.rectY(data, Plot.binX({y1: "p25", y2: "p75"}, {x, y, fill: "#ccc"})),
Plot.ruleY(data, Plot.binX({y: "p50"}, {x, y, strokeWidth: 2})),
Plot.dot(data, Plot.map({y: oqr}, {x, y, z: ???}))
]
})
I couldn’t figure out how to compute the per-bin outliers, though. Maybe we need a Plot.binmapX transform where z can be imputed by binning x? Or maybe there’s a way to compose the bin and map transform? 🤔
Ref. https://talk.observablehq.com/t/how-to-label-a-boxplot-with-dates-format-axis/7739/3