-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Violin Plots not Grouping into Multiple Violins #1389
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
Maybe related? plotly/plotly.js#3390 |
I wouldn't be surprised that they are related. I don't use plotly.js but the issue seems to be rather similar. |
Ah well Plotly.py is a wrapper for Plotly.js so you are kind of using it :) |
Fair, because I have heard about their being minor differences - with some parts of plotly.py not updating when plotly.js updates because of the potential for it to break, that's why I think this issue is probably still relevant to plotly.py users |
Thanks for taking the time to report this @Omniportance. I think there's a good chance that it's related to plotly/plotly.js#3390, but I'll leave this open here as well as a reminder to double check once plotly/plotly.js#3390 is addressed in plotly.js. |
Hmm, https://user-images.githubusercontent.com/46386737/50714159-392fe380-103d-11e9-91a3-ac15b8e23933.png looks like a violin generated from the plotly.py figure factory. |
Yeah, good point @etpinard. We should still get to the bottom of this, but the recommended way to create violin plots is now to use the first-class violin trace (https://plot.ly/python/violin/#multiple-traces) rather than the figure factory. I looked into this a bit, and something seems odd with the layout. Here's the layout that results from https://plot.ly/python/violin-plot/#multiple-violins.
The traces representing each violin group are assigned to different xaxis numbers. The figure factory doesn't (and hasn't ever as far as I can tell) specify an explicit domain for the different xaxis objects. We can add an explicit domain to each xaxis, which I expect will take care of the problem. but @etpinard @nicolaskruchten can you think of any reason why the default behavior here might have changed? |
Hi - we are currently trying to tidy up Plotly's public repositories to help us focus our efforts on things that will help users most. Since this issue has been sitting for several years, so I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our backlog. Thanks for your help - @gvwilson |
This seems to be an issue I experienced after updating plotly.py to 3.5.0, and the issue persists whether I install from conda or from pip
Based on the example from here: https://plot.ly/python/violin-plot/
Using the code provided:
The same problem persists with my own data, the plots end up overlapping rather than grouping. This was literally working fine yesterday on an older version (3.4.2) of plotly, but now I cannot update or create multiple violin plots, despite no change in code.
The output looks something like this:
The text was updated successfully, but these errors were encountered: