Category guide / Distribution

Choosing a Distribution Chart

Use Histogram for binned counts, Box Plot for compact summaries, and Density or Violin for estimated shapes from raw observations. Use Beeswarm when each measured value and its repeats should remain visible.

Make the First Choice

Match the question and data to the chart
Question or detailChartWhat to check
Where do observations cluster in a numeric range?HistogramNumeric intervals and counts, with clear boundaries and bin widths.
How do group centers and spreads compare?Box PlotCompatible quartile and whisker summaries for each group.
How do smoothed distribution shapes compare?Density PlotRaw observations, an explicit bandwidth, and density units.
Where is each group concentrated around its median?Violin PlotRaw observations, the width-normalization rule, and a separately calculated median.
Which individual values occur, including repeats?Beeswarm PlotOne point per observation, with collision spacing that does not alter the measured coordinate.
How many observations belong to each named type?Bar ChartCategory 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.

Illustrative values for this example
RouteMinQ1MedianQ3Max
A12348
B23357

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.

Keep Exploring

Bar Chart vs HistogramChoosing a Relationship Chart