Violin plots are used for plotting numeric data.
They are similar to box plots except they also combine the basic box plot with a rotated version of kernel density estimation. This allows them to show the probability density of the data along with the information that a box plot provides.
Compared to standard box plots that only show basic statistics (such as mean, median, and interquartile ranges), violin plots show the full distribution of the data. This especially useful when the data distribution has multiple peaks and troughs (multimodal). A violin plot is able to show the different peaks, their position and relative amplitude whereas the box plot can only show the maximum amplitude.
Use the dropdown menu below to compare the box and violin plots for various datasets.
The violin plot here shows a lot more information about how the data is distributed.