Violin Plot
Variant: Standard
Made-up data, for demonstration only
Variants
4 types · click one to see it in the frame above- Difference from standard
- The recommended type; use it as a starting point
- Use when
- See the shape of a distribution alongside the groups
Violin Plot is a chart that shows the spread of numeric values for each group as a symmetric shape. The wide parts are where the data is dense. Use it to compare the spread of several groups at once, such as income by age group.
How to read a Violin Plot
- One violin is one group. This example has 4 age groups, 20–29, 30–39, 40–49 and 50–59 years, each with 120 made-up people.
- The vertical axis is income, in thousands of dollars per year.
- The width of the shape is density. A bulge means many people sit near that value. It does not mean a high value. Read high or low from the vertical axis.
- The left and right sides are a mirror image of the same data. They are not two groups.
- The 20–29 group is tight. Median income is about 22 thousand, and the middle 80% sits at about 15 to 29 thousand.
- The 40–49 group has a long tail upward. The median is about 42 thousand, 24 of 120 people earn more than 60 thousand, and the highest is about 86 thousand.
- The 50–59 group has a lower median, about 37 thousand, with another 10 high earners above 60 thousand.
A violin is a density estimate turned 90 degrees and mirrored. It starts and ends at the lowest and highest values in the data.
When to use it
- Each group has a lot of data. A violin suits data too plentiful to show point by point.
- You need to see the shape of the spread for several groups. If you suspect the data has two peaks, a violin shows them correctly, and a box cannot.
- You want a shape that a box summary cannot give. A violin shows one peak or several. If you need to read the median and quartiles clearly, lay a box over it or use a Box Plot.
When not to use it
- There is little data. Check first that each group has enough points to draw a smooth line. If not, use a Beeswarm Plot or a Strip Plot to show every point.
- You want a compact five-number summary. Use a Box Plot.
- You want to stress the order of several groups. A Ridgeline Plot may show how the shape changes in sequence.
- You want to count values per range. Use a Histogram.
Common mistakes
1. Reading the shape as real data at every point
The bulges come from a density estimate. The shape can look as if there is data where there is none, or look dense when there is little data. Try the "Show data points" variant, which lays every person over the shape.
2. Not giving the size of each group
When groups differ a lot in size, show the counts, such as n= under the group name.
Synthetic data: you cannot see how many points are in each group
Same data: the real spread of points can be checked
3. No middle value to compare
A bare violin does not give the median. Try the "Mean line" variant, or put a small box in the middle of the shape. A box inside a violin shows the median and quartiles at a glance. Try the "No inner box" variant to see the difference.
4. Ordering groups arbitrarily
Sort groups by median so the picture tells its story better. This example sorts by age because age has a natural order.
5. Using different bandwidths without explaining
Different smoothness can make one group look more multi-peaked than another when the data is similar. Use the same bandwidth rule for every group, and say which method you used.
Compared with similar charts
| Chart | How it differs | Choose it when |
|---|---|---|
| Violin Plot | A two-sided density shape | Several groups, lots of data, and you want the shape |
| Box Plot | A box of five values | A compact summary, with small to medium data |
| Beeswarm Plot | Every point spread by density | Little data, and you want to see every value |
| Ridgeline Plot | Overlapping curves | A few groups in a sequence |
| Raincloud Plot | A half violin, a box and points | You show both the shape and the real data |
History and development
Wickham and Stryjewski explain that before the violin there was Benjamini's 1988 vase plot, the first to replace the box with a density curve. The violin shows the density of all the data, not just the middle range. Jerry Hintze and Ray Nelson proposed the violin plot in The American Statistician in 1998. Later, Kampstra's 2008 bean plot added lines for each data point and a line for the mean.
Frequently asked questions
Does width mean a high value?
No. Width is density. Read high or low values from the numeric axis.
Are the two sides different groups?
In the usual form they are a mirror image of one group. In a split violin, the two sides stand for different groups.
How is a violin different from a box plot?
A violin shows the whole density, so it can show data with two peaks. A box plot shows the median and quartiles. They can be laid over each other.
How many points per group are enough?
There is no fixed number. Check there are enough to draw a smooth line. If you are not sure, lay the data points over the shape.
References
- Fundamentals of Data Visualization, ch. 9: Visualizing many distributions at once · Claus O. Wilke · clauswilke.comUsed to confirm: comparing many distributions at once, such as box plots and violins
- Violin plot · Data to Viz · www.data-to-viz.comUsed to confirm: how to read a violin plot and what to watch for
- 40 years of boxplots · Wickham, H., & Stryjewski, L. (2011) · vita.had.co.nzUsed to confirm: the history and the variants of the box plot
Last updated 28 Nov 2026