Make the First Choice
| Question or detail | Chart | What to check |
|---|---|---|
| Where do observations cluster in a numeric range? | Histogram | Numeric intervals and counts, with clear boundaries and bin widths. |
| How do group centers and spreads compare? | Box Plot | Compatible quartile and whisker summaries for each group. |
| How do smoothed distribution shapes compare? | Density Plot | Raw observations, an explicit bandwidth, and density units. |
| Where is each group concentrated around its median? | Violin Plot | Raw observations, the width-normalization rule, and a separately calculated median. |
| Which individual values occur, including repeats? | Beeswarm Plot | One point per observation, with collision spacing that does not alter the measured coordinate. |
| How many observations belong to each named type? | Bar Chart | Category counts rather than numeric intervals. |
WORKED EXAMPLE / ILLUSTRATIVE DATA
Read Two Delivery-Time Summaries
These fictional summaries describe delivery time in days. The whiskers below use the minimum and maximum. They are supplied summaries, so they do not tell us the sample size or the shape of either distribution.
| Route | Min | Q1 | Median | Q3 | Max |
|---|---|---|---|---|---|
| A | 1 | 2 | 3 | 4 | 8 |
| B | 2 | 3 | 3 | 5 | 7 |
Both routes have a median of 3 days. Route A has an interquartile range of 2 days; Route B has 2 days as well. Their extrema differ. We cannot infer which route has more late deliveries from these five-number summaries alone.
Keep Raw Observations Separate From Summaries
The Histogram example accepts supplied bin counts, and Box Plot accepts five-number summaries. Neither input can reconstruct the original values needed by Density, Violin, or Beeswarm. Those editors instead use one group and one measurement per row, keeping repeated values as separate observations.
The three raw-observation examples share an illustrative response-time dataset. Beeswarm retains the measured coordinate and moves dots only across the other direction to avoid overlap. A single observation or constant group is valid; dense groups can require smaller dots.
Treat Smoothing and Width as Choices
Density and Violin use Gaussian kernels with a separate Scott bandwidth for each group. Their editors require at least two different values per group, although such a small sample rarely establishes a reliable distribution shape. Smoothing can extend beyond the observed range or below a meaningful zero.
Each complete density estimate integrates to one, so height is not a group count or the probability of one exact value. Violin scales each group to the same maximum width and adds its observed median. Equal widths across violins do not necessarily mean equal density or equal sample size. Read the counts and raw table as well as the shapes.
Try More Than One Bin Width
A histogram depends on interval boundaries. Very wide bins can hide clusters, while very narrow bins can make random variation look like structure. Inspect more than one reasonable bin width before describing a pattern.
Label whether height means count, share, or density. For unequal bin widths, a density scale makes area represent frequency or proportion. Comparing raw heights across unequal-width count bins can mislead. The ChartTypes histogram uses ten equal-width bins and supplied counts.
State the Whisker Convention
The box spans the first to third quartile, with a line at the median. Whiskers may reach the extrema or use an outlier rule such as 1.5 times the interquartile range. State which convention the chart uses.
A point outside a whisker is not automatically an error. Investigate its source and context. If the underlying observations matter, supplement the summary with a histogram or individual points, and disclose sample sizes when known.
Before You Publish
- Explain smoothing and width normalization, and disclose sample sizes when known.
- Keep units and bin boundaries comparable across groups.
- State the whisker rule.
- Avoid reconstructing raw observations from summary statistics.
Explore Working Examples
Open a chart to inspect its sample data and compare code in six libraries.