-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Violins and Boxes not always honoring 'group' #3390
Comments
Would it be too much to ask to share the "data" / "layout" of that graph. I'm not too familiar with |
OK, so the reason it's not grouping is because of this block: plotly.js/src/traces/box/cross_trace_calc.js Lines 80 to 84 in 364cdec
I'm not super clear on what it's doing or why but temporarily deleting that block does force things back into grouping mode, like it says in the comment. BUT I then get this odd behaviour, where it's grouping "too much"... it's like it doesn't think that the various "female" groups are the same and so it's leaving a bunch of extra room in each subplot :) ... split off into #3402 |
Maybe related? plotly/plotly.py#1389 |
Hmm actually the “too much grouping” is present in the first two screenshots as well, just less obviously-so. That might just be a separate issue. (see #3402) |
Consider the following:
which currently looks like: codepen: https://codepen.io/etpinard/pen/GPLXWX?editors=1010 Now after 🔪 ing block plotly.js/src/traces/box/cross_trace_calc.js Lines 80 to 84 in 364cdec
like it was proposed in #3390 (comment), we get In brief, currently we "disable" grouping when there are as many distinct box/violin positions as there are box/violin traces. One could argue that this piece of logic is too magical. Afterall, both on The case brought in https://plot.ly/~nicolaskruchten/252 is even more subtle. Here, there are as many distinct violin positions as there are violin traces on only one particular subplot (the bottom-left one, 1 violin position for 1 violin trace). So, this disables grouping for all subplots. This is obviously wrong: that check should happen at the graph-level, not the subplot-level. Fixing this would be easy. That said, instead of just fixing the above case, should we instead remove the magical disable-grouping block altogether? |
I would be fine with removing this magic, given that it can be turned on explicitly with |
done in #3445 |
I'm seeing some odd inconsistencies in overlay vs group modes with boxes/violins... In all of the following cases,
violinmode = "group"
:The last one is where the problem is: why are they overlaid?
The text was updated successfully, but these errors were encountered: