Skip to main content
Albero Academy

Violin Plots

Box plots plus the full distribution shape.

Categorical Plots7 min

A violinplot combines a box plot with a KDE: the width at each point shows how many observations are there. It reveals the shape a box plot hides — including multiple peaks.

violinplot

shape + summary
sns.violinplot(data=tips, x="day", y="total_bill")
# split=True mirrors two hue groups on each violin — compact comparison
sns.violinplot(data=tips, x="day", y="total_bill", hue="sex", split=True)

Key takeaways

  1. 01violinplot shows distribution shape (a mirrored KDE) plus box-plot summary.
  2. 02Its width encodes density — it reveals multiple peaks a box hides.
  3. 03split=True mirrors two hue groups on one violin for compact comparison.
  4. 04Being KDE-based, it can over-smooth very small groups.

Finished this chapter?

Mark it complete to track your progress through Seaborn.