Skip to main content
Albero Academy

Strip & Swarm Plots

Show every individual observation across categories.

Categorical Plots7 min

Sometimes you want to see every data point, not just a summary. stripplot and swarmplot scatter individual observations across categories — great for small-to-medium datasets.

strip vs swarm

every point
sns.stripplot(data=tips, x="day", y="total_bill", jitter=True) # random jitter
sns.swarmplot(data=tips, x="day", y="total_bill") # non-overlapping

stripplot adds random horizontal jitter so points don't stack; swarmplot carefully arranges points so none overlap, showing density by width — but it's slow and cluttered for large data.

Overlaying on a box/violin

summary + raw points
sns.boxplot(data=tips, x="day", y="total_bill", fill=False)
sns.stripplot(data=tips, x="day", y="total_bill", color="black", alpha=0.4)

Key takeaways

  1. 01stripplot and swarmplot show every individual observation per category.
  2. 02stripplot uses random jitter; swarmplot arranges points non-overlapping (but is slow on big data).
  3. 03Overlay a strip/swarm on a box/violin to show summary + raw points.
  4. 04For large datasets prefer strip with alpha over swarm.

Finished this chapter?

Mark it complete to track your progress through Seaborn.