Eric J Ma's Website

Boxplot or Violin Plot?

written by Eric J. Ma on 2016-09-27 | tags: data visualization data science

The same data, different visualizations.

Here's the box plot version:

Data plotted using Seaborn's box plot.

And here's the violin plot version.

Data plotted using Seaborn's violin plot.

Which is more appropriate, and why?

I think the Box Plot is more suited for clearly delineating ranges: (min, max), (IQR), and medians, whereas the Violin Plot is more suited for visualizing the distribution of data, including the possibility of bi-/multi-modality.

I send out a newsletter with tips and tools for data scientists. Come check it out at Substack.

If you would like to receive deeper, in-depth content as an early subscriber, come support me on Patreon!