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.

Random jitter: the same data as a strip plot
One hundred task times per team, jittered at random. The two clusters in Team B are visible if you look, but the random spread puts as many dots at the edge of the band in the sparse middle as in the dense ends.
Deterministic packing: the same data as a bee swarm
Identical observations, packed. Team A swells into a single spindle; Team B's waist is unmistakable, because the swarm is only as wide as the number of dots that need the space. The outline is a density estimate that invents nothing.

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.

Dots too large: the swarm spills into its neighbours
Sixty response times per region at 15 px. The packing has nowhere to go but sideways, and the dense bands of North and West now reach towards each other across the gap.
Dots right-sized: the same swarm at 6 px
Same observations at 6 px. Each swarm sits comfortably inside its own column, its shape is legible, and every one of the 180 dots can still be found and hovered.

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.

Three hundred points per column
Three regions, 300 response times each. The dense middle of every swarm has been packed into a band nearly as wide as its column, the outline is a blob rather than a shape, and the value axis is doing all the work. The dots have stopped adding information.
The same 900 points as violins
At this sample size a kernel density estimate is trustworthy, and the violins say what the swarms were trying to: three near-symmetric humps, each shifted a little higher than the last, with slightly heavier upper tails.

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.

Horizontal swarms with long group names
Five ticket queues, one dot per ticket, values running left to right. The queue names sit on the left in full, and the reader scans down the rows as they would a table.

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

The composition of a bee swarm
An anatomical guide

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.

  • 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.