Feature request: allow non-symmetrical violint plots
See original GitHub issueHi!
I love violinplots, but I always found that it might not be needed to plot them as symmetrical, the information is doubly present for no real reason.
I will send a tiny pull request that adds a key-word argument nonsymmetrical
to seaborn.violint
, it can be False
(the default), or "left"
or "right"
(or "bottom"
or "top"
) to allow to only plot half of the violin.
Here are two tiny demos, for a single violin or more violins, for horizontal (top/bottom) or vertical (left/right) cases:
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
A Complete Guide to Violin Plots | Tutorial by Chartio
Violin plots are used to compare the distribution of data between groups. Learn how violin plots are constructed and how to use them...
Read more >Analyzing the fine structure of distributions - PLOS
The Python density and violin plots draw data above and below the limits of the data but show the bimodality of the ITS...
Read more >Box Plot Blunders
Still, it offers one extra goodie: asymmetrical plotting. An asymmetrical beanplot. The distribution-mirroring in violin plots is just a visual convention and ...
Read more >Violin Plots 101: Visualizing Distribution and Probability Density
A violin plot is a hybrid of a box plot and a kernel density plot, which shows peaks in the data. It is...
Read more >Violin plots - GraphPad Prism 9 User Guide
What is a violin plot? When you enter replicate values in side-by-side replicates in an XY or Grouped table, or stacked in a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
kind='kde'
tosns.catplot
would be perfect. We have had multiple requests from our clients to drop the symmetry as it can be off-putting. I think it is more important than you realise, @mwaskom, imho.For what it’s worth, I’m looking for half-violin plots for Raincloud plots. That package has its own implementation but… it’s mainly a copy of your code.
You can jigger seaborn to do half-violins by adding fake off-scale data to yourset and abusing the
hue
parameter, but that’s pretty gross.A more useful alternative, though, might be to add
kind='kde'
tosns.catplot
— really, a violin plot is just two kdeplots pasted together.Thoughts?