boxplot
Use to compare distributions across categories from raw observations: latency per service, scores per class. One row = one observation: x category, y number. Repeated categories are the point. Optional series puts one box per series inside each category. Keep category order as first seen. Quartiles use linear interpolation (type 7, as numpy, R, and Excel QUARTILE.INC). Whiskers reach the furthest observations inside 1.5 × IQR; the rest are hollow outlier dots. A group with fewer than five values shows its points and a median tick, not a box. An empty y is skipped. Negatives are fine.
Do not use for one number per category (bar) or for a single distribution's shape in detail (hist).
x category · y number (one observation per row) · series optional (one box per series)
Rules. Repeated categories are expected; keep first-seen order. Type-7 quartiles; whiskers at the furthest points inside 1.5 × IQR; points beyond are outliers. A group under five values shows its points and a median tick, not a box. An empty y is skipped.
Example
chart
markvis: 2
type: boxplot
title: Search answers fastest but has the longest tail
unit: ms
x: service
y: latency
service,latency
Search,42
Search,38
Search,45
Search,40
Search,39
Search,44
Search,120
Checkout,88
Checkout,92
Checkout,85
Checkout,95
Checkout,90
Checkout,99| service | latency |
|---|---|
| Search | 42 |
| Search | 38 |
| Search | 45 |
| Search | 40 |
| Search | 39 |
| Search | 44 |
| Search | 120 |
| Checkout | 88 |
| Checkout | 92 |
| Checkout | 85 |
| Checkout | 95 |
| Checkout | 90 |
| Checkout | 99 |
When the block is wrong
The rows stay, with one line that names the error.
chart
markvis: 2
type: boxplot
title: Text in a measure
x: service
y: latency
service,latency
Search,fast| service | latency |
|---|---|
| Search | fast |
E_BAD_NUMBER: row 1, column latency: "fast" is not a number
Generated from packages/types/boxplot/ and the type's row in SPEC.md.