Violin

Use violin plots to compare unusual distributions of multiple variables

Violin plots are a useful method for comparing distributions of several categories. In this case, a mirrored, vertical density plot is used to create a symmetrical shape representing the underlying data’s distribution. Violin plots are particularly useful for representing non-normally distributed data sets which are inadequately described by the mean and standard deviation.

To get an idea of how this works, let’s take a look at how random numbers fitting to different distributions look. We will use bimodal, normally and uniform distributed data.

Violin plots of bimodal, uniform and normal distributions.

Since the distribution of total sleep time is not normally distributed, we concluded that bar or dot charts showing the mean and standard deviation are poor visualisation choices. Violin plots are a good alternative. In the figure below, we present each sub-group’s individual data points (left) and the corresponding violin plot.

violin plots offer another alternative to bar charts for showing unusual distributions.

violin plots offer another alternative to bar charts for showing unusual distributions.

violin plots offer another alternative to bar charts for showing unusual distributions.