function boxY1(
data,
{
x = null,
y = { transform: x => x },
fill = "#ccc",
stroke = "currentColor",
thresholds = "sturges",
...options
} = {}
) {
const group = x == null ? Plot.groupZ : Plot.binX;
return Plot.marks(
Plot.ruleX(
data,
group({ y1: iqr1, y2: iqr2 }, { x, y, stroke, thresholds, ...options })
),
Plot.barY(
data,
group(
{ y1: quartile1, y2: quartile3 },
{ x, y, fill, thresholds, ...options }
)
),
Plot.tickY(
data,
group(
{ y: "median" },
{ x, y, stroke, strokeWidth: 2, thresholds, ...options }
)
),
Plot.dot(
data,
Plot.map({ y: outliers }, { x, y, z: x, stroke, thresholds, ...options })
)
);
}