Violin plot


A violint plot allows you to visualize the distribution of a numeric variable for one or several groups. Seaborn is particularly adapted to build it thanks to its violin() function. Violin plots deserve more attention than boxplots, which can sometimes hide features of the data.

Seaborn logoViolin charts with Seaborn

Seaborn is a python library that enables you to make better visualizations. It is well adapted to build density charts thanks to its violin function. The following charts will guide you through its usage, going from a very basic violin plot to something much more customized.

Matplotlib logoViolin charts with Matplotlib

Matplotlib, as usual, is another great otion to build violin charts with python. It comes with a violinplot() function that does all the hard work for us.

Here are a couple of examples:

🔎 violin function parameters→ see full doc

stringcolor under the curve


Contact


👋 This document is a work by Yan Holtz. You can contribute on github, send me a feedback on twitter or subscribe to the newsletter to know when new examples are published! 🔥