This entry is part of the Chart Index, the reference library for the Chart Design Field Guide.
The bee swarm is a strip plot where the jitter is not random. Instead of nudging dots by a random offset, the algorithm packs them: every dot finds the closest available position to its true value without overlapping its neighbours. The result is a shape that reads as both a distribution (because every point is visible) and a density (because the width swells where points cluster).
It is the strip plot's solution to its biggest weakness — random jitter discards information by introducing noise where the data has none. The bee swarm preserves the encoding value = position along the axis exactly while also revealing density. The cost is computation: the packing algorithm is more elaborate than dropping a random number.
What it is
A bee swarm maps a categorical variable to category position and a continuous variable to a perpendicular position. Each observation is rendered as a dot, placed deterministically so its position along the value axis is exact, and its position along the perpendicular axis is the closest free slot. The cluster shape reveals density: where many observations share a value, the swarm grows wide.
The hero chart above is a remuneration census: six departments, one dot per employee, 168 people in all. The swarm width at any height is the number of people paid about that much, so the reader sees the shape of each department's pay structure without abstraction — Engineering's long upper tail of senior salaries, Support's tight bulge, Sales' wide spread. Randomise the salaries and the swarm re-packs itself around the new values; the dots keep their colours and their columns, only their positions move.
When to use it
Bee swarms are the right choice when:
- You have medium samples — typically 50–500 per group, where strip plots overlap but full violins lose individuality.
- The reader's question is "every individual point, in distribution context" — useful for compensation, performance, individual-level metrics.
- You want density information without random jitter noise.
- The data is continuous and the per-point identity matters.
- You can label or highlight individual dots of interest (a named outlier, the reader's own value).
When not to use it
- Large samples. Above 1,000 points per group, the swarm becomes wider than the category gap and bleeds into adjacent groups. Use a violin or density.
- Tiny samples. A swarm of 8 dots is just a column. Use a simple strip plot or labelled dots.
- Categorical or discrete value axes. Bee swarms need continuous values; integer columns produce stacked vertical bands rather than organic shapes.
- When precise quartiles matter. Like the strip plot, the swarm shows points, not summaries. Overlay a box or median if quartiles are part of the reading task.
Design principles
Pack, do not scatter
Random jitter and deterministic packing draw the same observations very differently. The strip plot spreads dots across its band whether or not they need the room; the swarm only widens where the data is dense, so the outline of the swarm is the density curve.
Make every dot visible
The bee swarm's point is that every observation has a unique position. Use small dots, full opacity, and no overlap. If the swarm is spilling sideways, the dots are too big for the canvas — shrink them or give the chart more height.
Know when the sample is too big
Above a few hundred points per group the swarm's width stops being informative and starts being a problem: the densest band grows wider than the gap between categories. That is the moment to hand over to a form that draws the density directly.
Highlight specific points
The form is uniquely suited to here is your dot in the distribution presentations. The reader's own value gets the accent colour and a small label; everything else recedes to neutral. This is the canonical use for editorial bee swarms in compensation and benchmarking displays.
Add a summary overlay when needed
A bee swarm alone shows the data; a bee swarm with a median line, a quartile band, or an embedded box recovers Tukey's summary. Most readers want both. Where the tooling will not overlay them, a box plot of the same groups beside the swarm serves.
Run the swarm sideways for long labels
Nothing in the algorithm cares which way is up. When the group names are long — teams, products, suburbs — a horizontal layout gives each its own line and reads as a ranked list.
Pick the right group count
Two to eight groups is the comfort zone. Twelve still works at typical widths. Beyond that, the columns become narrow and the swarms become brittle. Switch to a ridge plot.
Anatomy
A bee swarm is structurally a deterministically-packed cloud of points with optional summary overlays. The shape that emerges is incidental to the algorithm but central to the form's perceptual contract.
Related types
- Strip / jitter plot — random jitter, faster, less informative shape.
- Violin plot — smoothed density, no individual points.
- Box plot — pure summary, no individual points.
- Raincloud plot — half-violin + box + strip / swarm. The maximalist option.
- Sina plot — bee swarm constrained to fit within a violin outline. Combines density shape with individual points.
Reading list
- Eklund, A. (2012). beeswarm: The Bee Swarm Plot, an Alternative to Stripchart. R package documentation; the modern form's introduction.
- Bostock, M. (2016). D3 force-directed beeswarm examples. Web-native implementations.
- Sidiropoulos, N. et al. (2018). SinaPlot: An Enhanced Chart for Simple and Truthful Representation of Single Observations. The violin-constrained swarm.