Violin plot

Method of plotting numeric data
title: "Violin plot" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["statistical-charts-and-diagrams"] description: "Method of plotting numeric data" topic_path: "general/statistical-charts-and-diagrams" source: "https://en.wikipedia.org/wiki/Violin_plot" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary Method of plotting numeric data ::
::figure[src="https://upload.wikimedia.org/wikipedia/commons/3/3a/Violin_plot.gif" caption="Example of a violin plot"] ::
::figure[src="https://upload.wikimedia.org/wikipedia/commons/3/34/Violinplot-hiv-paper-plot-pathogens.svg" caption="Example of a violin plot in a scientific publication in [[PLOS Pathogens]]."] ::
A violin plot (also known as a bean plot) is a statistical graphic for comparing probability distributions. It is similar to a box plot, but has enhanced information with the addition of a rotated kernel density plot on each side.
History
The violin plot was proposed in 1997 by Jerry L. Hintze and Ray D. Nelson as a way to display even more information than box plots, which were created by John Tukey in 1977. The name comes from the plot's alleged resemblance to a violin.
Description
Violin plots are similar to box plots, except that they also show the probability density of the data at different values, usually smoothed by a kernel density estimator. A violin plot will include all the data that is in a box plot: a marker for the median of the data; a box or marker indicating the interquartile range; and possibly all sample points, if the number of samples is not too high.
While a box plot shows a summary statistics such as mean/median and interquartile ranges, the violin plot shows the full distribution of the data. The violin plot can be used in multimodal data (more than one peak). In this case a violin plot shows the presence of different peaks, their position and relative amplitude.
Like box plots, violin plots are used to represent comparison of a variable distribution (or sample distribution) across different "categories" (for example, temperature distribution compared between day and night, or distribution of car prices compared across different car makers).
A violin plot can have multiple layers. For instance, the outer shape represents all possible results. The next layer inside might represent the values that occur 95% of the time. The next layer (if it exists) inside might represent the values that occur 50% of the time.
Violin plots are less popular than box plots. Violin plots may be harder to understand for readers not familiar with them. In this case, a more accessible alternative is to plot a series of stacked histograms or kernel density plots.
The original meaning of "violin plot" was a combination of a box plot and a two-sided kernel density plot. However, currently "violin plots" are sometimes understood just as two-sided kernel density plots, without a box plot or any other elements.
References
References
- (2015-10-13). "Violin Plot". National Institute of Standards and Technology.
- Hintze, Jerry L.. (May 1998). "Violin Plots: A Box Plot-Density Trace Synergism". The American Statistician.
- Wilke, Claus O.. "Fundamentals of Data Visualization".
- "Violin plot — geom_violin".
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::