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 = horizontal position 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.
Six departments, several hundred employees each. The swarm width at any height encodes the density of salaries at that level; the asymmetry of some swarms (engineering has a long upper tail; support has a tight central bulge) tells the compensation-structure story without abstraction.
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
Make every dot visible
The bee swarm's point is that every observation has a unique position. Use small dots (2.5–5 pixels), full opacity, and no overlap. If dots overlap, the algorithm has failed — increase the canvas height or decrease the dot size.
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.
Constrain the swarm width
The packing algorithm can spread a dense cluster wider than is helpful. Set a maximum width; clip dots that would otherwise bleed into adjacent groups. Better to truncate the swarm than to confuse the eye about category membership.
Sort the dots when labels matter
If you label individual dots, the eye looks for the labelled one within a sea of unlabelled ones. Use a high-contrast colour for the labelled dots and place their labels near rather than inside the swarm.
Pair with category summary statistics
A small inline median bar or a thin box overlaid on each swarm doubles the chart's information density. Tukey's summary plus Tukey's full data, in one composition.
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.