logoalt Hacker News

staredtoday at 3:13 PM1 replyview on HN

Violin plots have an interesting reputation (https://xkcd.com/1967/, https://www.reddit.com/r/labrats/comments/91ex4u/is_it_just_..., https://jabde.com/2022/12/22/banned-violin-plots/).

For showing distributions, I much prefer strip plots (https://seaborn.pydata.org/generated/seaborn.stripplot.html), perhaps with opacity, or swarm plots (https://seaborn.pydata.org/generated/seaborn.swarmplot.html) - no averaging with an unknown kernel, no hiding distributions behind a box plot, and the data is directly visible. We also directly see whether it is based on 5, 100, or many more points.

When using histograms, binning is usually more straightforward than kernels. And in any case, the mirror reflection of a histogram is not needed.


Replies

pks016today at 4:24 PM

Another alternative is raincloud plot (depending on data).