boxplot
A sample drawn as its five-number summary, on the number line (canvas.graph:x) and nowhere else. boxplot(x: 2, 3, 3, 4, 7, 9) takes the readings themselves, the way a scatter does, and works the summary out: the box spans the quartiles with the median ruled across it, and the whiskers run out to the readings beyond them. The quartiles are Tukey's hinges — the median splits the ordered readings in two, itself in neither half when the count is odd, and each quartile is the median of its half — which is what a box plot has always drawn and what a class is taught to find by hand. Several boxplots share the room above the line, a lane each in source order, alongside the scatter dot plots — except that a box and a scatter of the *same readings* are one sample drawn twice and take one lane, so writing both puts the summary over the readings with nothing to position by hand. Which is drawn over which is source order and layer:, as for any pair of marks.
#Attributes
#trial.mass). The sample itself, not a summary of it: a summary written by hand cannot be checked against the sample it claims to summarise. A row that is not a number drops.Can be written as shorthand: boxplot:valuefences stops each at the furthest reading within one and a half interquartile ranges of its quartile and draws whatever lies beyond as its own dot; extremes runs them to the smallest and largest readings, and then nothing stands out.!outliers takes them off anyway — for a scene about the middle of a distribution rather than its tails, and for one that puts them back on a step, since it is animatable (outliers: false !cue.to{true}(at: 2)). The frame still holds them, so fading them in does not move the axis. Nothing under whiskers: extremes, which has no reading outside its whiskers.$maths$ and inline formatting render. Fades and draws with the element.hidden: true !cue.to{false}(at: 2) reveals it — and unlike a cue, a hidden element still frames the plot, so the axes do not jump when it appears. It holds its lane the same way, drawn yet or not, so a box arriving on a step lands beside the marks already on the line rather than moving them.editable: graph. Nothing at all on a graph that is not editable.#Derived attributes
Computed while the element renders — read one with #id.name in attribute position or !value:#id.name in prose, never set.
q3 − q1 — the width of the box.#Allowed in
#Examples
boxplot(x: 2, 3, 3, 4, 4, 5, 5, 7, 12)boxplot(x: #trial.mass; colour: teal; label: control)boxplot(x: #trial.mass; whiskers: extremes)