-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
violin
trace: why an area is calculated if all values are 0?
#3622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you @micosacak for your interest in plotly.js and for reporting this. When reporting an issue, it is more convenient for the maintainers if you provide a Codepen showing the problem. I prepared one here: https://codepen.io/antoinerg/pen/QoqWBb. Can you fork it and add the missing variables Thank you! |
Thanks a lot @antoinerg. I forked the values as following;
|
And especially, Cell_0, Cell_5, Cell_6, Cell_7 and Cell_17 have zero values for all. I also wonder why Cell_14 and Cell_16, as well with negative values. |
Trying to plot datasets
Thanks @micosacak for reporting this issue! |
violin
trace: why an area is calculated if all values are 0?
Even when setting plotly.js/src/traces/violin/calc.js Lines 126 to 158 in 7e68a2e
I haven't delved into |
@alexcjohnson I'm tempted to return a tiny range around It looks fine alongside another violin: |
I don't think we can do that, whatever size we choose someone will come up with a data set that has a natural size smaller than that. It has to actually have zero size, even if that means a special case with its own drawing code. |
@alexcjohnson I don't know what I was thinking 😅! That would have been a horrible hack. PR #3625 is much better. |
Please see my question in stackoverflow
I have an array of values from 0-10 with and 20 groups in each. For some groups or categories all values are 0. When I use violin plot, there is an area calculated which is below 0, but I want to get thedifferent that I got from Seurat package VlnPlot. Is there a way to overcome that problem? Here is a part of java script code:
The text was updated successfully, but these errors were encountered: