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
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
// 04 — Usage
When to use it — and when not to
- 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
- 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.
Identify the axis
One axis shows the continuous measurement. The other shows categories or is simply the displacement axis.
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.
Spot outliers
Isolated dots far from the main swarm are outliers. They're immediately visible — no calculation required.
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.
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.
| department | salary |
|---|---|
| Engineering | 105000 |
| Engineering | 112000 |
| Marketing | 72000 |
| Sales | 68000 |
| Sales | 74000 |
// R example
library(beeswarm)
beeswarm(salary ~ department, data = df,
pch = 16, col = "#c94a2e")// 07 — Construction
How to build a beeswarm plot
Sort data points along the value axis
Place each dot on the value axis at its measured position
When a dot overlaps an existing dot, displace it along the perpendicular axis
Use a force-simulation or greedy-packing algorithm to find non-overlapping positions
Draw each dot with a consistent radius — avoid varying sizes unless encoding a third variable
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
Showing every player's sprint speed by position — the swarm reveals outliers (unusually fast or slow players) that summary stats would hide.
Plotting individual student test scores across classrooms to see whether performance differences are driven by outliers or overall shifts.
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 as | Swarm plot, bee swarm chart |
| Category | Distribution |
| Data type | One continuous variable, optionally grouped by a category |
| Axes | Value axis (continuous) + displacement axis (perpendicular) |
| Ideal data size | 20–500 observations per group |
| Key parameter | Dot radius — determines displacement behavior |
| Popularized by | R 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.