Open
Description
The map transform groups by y and not by intervaled y. If you replace y: (d) => ((d.height * 10) | 0) / 10
below by y: "height"
, the box plot shows too many outliers (the outliers are using a map transform).
Here's a test with the correct outliers:
export async function boxplotXInterval() {
const olympians = await d3.csv<any>("data/athletes.csv", d3.autoType);
return Plot.plot({
y: {interval: 0.1, reverse: true},
marks: [
Plot.boxX(
olympians.filter((d) => d.height),
{x: "weight", y: "height", z: (d) => Math.floor(d.height * 10)}
)
]
});
}
now, remove the z specified above, and you get this incorrect chart, where you have "outliers" inside the q1-q3 band:
(excerpted from #1839; note that I've updated the code slightly to add y: {reverse: true}, for when we create the actual unit test.)