DistributionIntermediate

Beeswarm Plot

A scatter plot along a single axis where overlapping dots are nudged apart — revealing every individual data point while still showing the shape of the distribution.

// 01 — The chart

What it looks like

Example — Salary distribution by departmentn = 120 employees
EngineeringMarketingSales60k80k100k120k

A beeswarm plot showing individual salaries across three departments. Engineering salaries cluster higher and have wider spread.

// 02 — Definition

What is a beeswarm plot?

A beeswarm plot is a one-dimensional scatter plot where each dot represents a single data point. When dots would overlap, they are displaced along a perpendicular axis — creating a “swarm” shape that looks like bees clustering around their hive.

Unlike a histogram or density plot that summarizes data into shapes, a beeswarm preserves every individual observation. This makes it ideal for small-to-medium datasets (20–500 points) where the exact distribution of points matters. You can see outliers, clusters, and gaps directly.

The displacement algorithm is the key technical detail: it must nudge points just enough to avoid overlap, while keeping them as close to the center line as possible. This creates the characteristic elongated, eye-shaped cluster.

Name origin: The name “beeswarm” describes the visual result — dots displaced around a central axis resemble a swarm of bees. The R package beeswarm (2008) popularized both the name and the technique.

// 03 — Anatomy

Parts of a beeswarm plot

EABCD
A — Center line: The baseline each group clusters around — displacement is perpendicular to this
B — Value axis: The continuous measurement scale along which data points are positioned
C — Individual dot: Each dot represents one data point — none are hidden or aggregated
D — Swarm width: The perpendicular spread of dots — wider sections indicate more data at that value
E — Outlier: An isolated dot far from the main swarm — immediately visible as an extreme value

// 04 — Usage

When to use it — and when not to

✓Use a beeswarm plot when…
  • You want to show every individual data point (20–500 observations)
  • Comparing distributions across 2–5 categorical groups
  • Identifying outliers, clusters, and gaps in the data
  • The audience is technical and expects to see raw data
  • You want the shape of the distribution plus individual detail
  • Data is small enough that dot-level detail adds value
×Avoid a beeswarm plot when…
  • You have thousands of data points — dots become an unreadable blob
  • You need to show summary statistics (median, IQR) — add a box plot overlay
  • The audience is non-technical — a histogram or bar chart is clearer
  • You have highly concentrated data — dots pile up even with displacement
  • Space is limited — beeswarms need width to spread dots properly
  • Groups have wildly different sample sizes — visual balance is lost

// 05 — Reading guide

How to read a beeswarm plot

Follow these steps to interpret a beeswarm plot effectively.

1

Identify the axis

One axis shows the continuous measurement. The other shows categories or is simply the displacement axis.

2

Look at the swarm's shape

Wide bulges indicate many data points at that value. Narrow sections have fewer points. The shape mirrors the density.

3

Spot outliers

Isolated dots far from the main swarm are outliers. They're immediately visible — no calculation required.

4

Compare groups

If multiple groups are shown side by side, compare where the swarms are centered, how wide they are, and whether their shapes differ.

5

Check for clusters

Look for gaps or splits in the swarm — these suggest distinct subgroups within the data.

// 06 — Data format

What your data should look like

A continuous numeric column and an optional categorical group column.

departmentsalary
Engineering105000
Engineering112000
Marketing72000
Sales68000
Sales74000

// R example

library(beeswarm)
beeswarm(salary ~ department, data = df,
         pch = 16, col = "#c94a2e")

// 07 — Construction

How to build a beeswarm plot

1.

Sort data points along the value axis

2.

Place each dot on the value axis at its measured position

3.

When a dot overlaps an existing dot, displace it along the perpendicular axis

4.

Use a force-simulation or greedy-packing algorithm to find non-overlapping positions

5.

Draw each dot with a consistent radius — avoid varying sizes unless encoding a third variable

6.

Add group labels and the value axis with clear tick marks

// 08 — Pitfalls

Common mistakes

×

Too many data points

Beyond ~500 points, the swarm becomes a shapeless blob. Switch to a density plot or hexbin for large data.

×

Dots too large

Large dot radii cause excessive displacement and distort the swarm's shape. Use the smallest radius that's still visible.

×

Missing the value axis baseline

Without clear axis labels and gridlines, individual dot positions are hard to read. Always include a labeled axis.

×

Confusing with jitter plots

Beeswarm uses systematic displacement to avoid overlap; jitter uses random noise. They serve different purposes.

// 09 — In the wild

Real-world examples

Sports analytics

Showing every player's sprint speed by position — the swarm reveals outliers (unusually fast or slow players) that summary stats would hide.

Education

Plotting individual student test scores across classrooms to see whether performance differences are driven by outliers or overall shifts.

Biomedical research

Displaying individual cell measurements across treatment groups — essential when sample sizes are small and every observation matters.

// 10 — At a glance

Quick reference

Also known asSwarm plot, bee swarm chart
CategoryDistribution
Data typeOne continuous variable, optionally grouped by a category
AxesValue axis (continuous) + displacement axis (perpendicular)
Ideal data size20–500 observations per group
Key parameterDot radius — determines displacement behavior
Popularized byR beeswarm package (Aron Eklund, 2008)

// 11 — Accessibility

Accessibility notes

✓

Use distinct fills or stroke styles for different groups — not just color hue

✓

Include aria-labels describing the overall distribution: 'Engineering salaries range from 85k to 130k, centered around 105k'

✓

Consider larger dot sizes for low-vision users, balancing with displacement needs

✓

Provide a sortable data table as an alternative for screen readers

✓

Add tooltips on hover showing the exact value of each data point

// 12 — Variations

Variations

Beeswarm + box plot

Overlay a box plot on the swarm to show summary statistics alongside individual points.

Sized beeswarm

Vary dot size to encode a third variable — but beware of increased overlap.

Color-coded beeswarm

Color each dot by a second categorical variable to reveal subgroups within the swarm.

Horizontal beeswarm

Flip the swarm horizontal for long category names or when horizontal feels more natural.

// 13 — FAQs

Frequently asked questions

What is a beeswarm plot?+

A beeswarm plot is a one-dimensional scatter plot where each dot represents a single data point. When dots would overlap, they are displaced along a perpendicular axis — creating a "swarm" shape that looks like bees clustering around their hive.

When should you use a beeswarm plot?+

Use a beeswarm plot when you want to show every individual data point (20–500 observations). It also works well when comparing distributions across 2–5 categorical groups, and when identifying outliers, clusters, and gaps in the data.

When should you avoid a beeswarm plot?+

Avoid a beeswarm plot when you have thousands of data points — dots become an unreadable blob. It is also a poor fit when you need to show summary statistics (median, IQR) — add a box plot overlay, or when the audience is non-technical — a histogram or bar chart is clearer.

What data do you need to make a beeswarm plot?+

A continuous numeric column and an optional categorical group column.

Are beeswarm plots accessible to screen readers?+

Yes — a beeswarm plot can be made accessible to screen readers by pairing it with a clear text summary of the key insight, ensuring color choices meet WCAG contrast guidelines, adding descriptive alt text or aria-label to the SVG, and offering the underlying data as an HTML table fallback for assistive technologies.

Is a beeswarm plot suitable for dashboards?+

Yes — a beeswarm plot can work well in dashboards as long as the panel is large enough for readers to perceive the encoded values, has a clear title, and includes the legend or axis labels needed to interpret it.