-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Axis matching limitation #4501
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
The issue is that We also discussed A related question - though this part would clearly need to be a new feature, whereas the above may be considered a bug - is whether the trace-less subplots should show up in this case. One could argue that since |
@archmoj can you try the "add it to |
@nicolaskruchten sure. |
Minimal bug demo. |
I don't think this is the right bug... there is no |
the problem in my pen is that panning any subplot should pan all of them due to |
A minimal test case would look like:
|
Yeah sorry, I muddied the waters with my "related question" about showing subplots with no traces. There may be another variant of the bug here too though: if you anchor an axis that is shown to another axis that isn't shown, will the one that is shown end up drawing its ticks etc in the wrong place? But let's keep that separate and just look at |
Revised minimal bug demo. |
I don't mind the current "no traces, no subplot shown" behaviour, so yes, let's factor that out of the discussion for now. The core issue for me is that |
Yes, the new minimal bug demo captures my intent here, thanks @archmoj :) |
Not clear to me, if we should still pan together if the axes matches x2 and y2 references instead of x and y? |
I don't understand that last question... can you rephrase? |
To me, if A and B match C, they should pan together, regardless if C has traces, or if C's number is greater than or less than or in between A and B's numbers :) |
In the minimal bug codepen, here I simply renamed x to x2 and y to y2 and used matching references to x2 and y2 instead of x and y. Do we still expect the axes to pan together, or |
Yes, see above re A,B,C ... IMO there should be no special treatment for x/y per se as opposed to x2/y2 or whatever |
Pasting comments from plotly_js channel here: On Jan. 21 Mojtaba 9:43 AM Linking subplots to the currently invalid axes appeared to be a pretty complicated process (with missing extremes to compute autorange, etc) Nicolas 10:07 AM ok thanks for looking into it Mojtaba 10:19 AM Yeah, I think that's the cleanest solution namely if we prefer not to display the x.y sub-plot in future. |
Ok, let me try to summarise the current state of affairs. Minimal example: https://codepen.io/MojtabaSamimi/pen/wvBRGyV?editors=0010 where
Proposed solution 1From @alexcjohnson 's #4501 (comment)
@archmoj attempted this in 137d73d, but ran into problems trying to make this solution work, saying: "appeared to be a pretty complicated process (with missing extremes to compute autorange, etc)" Proposed solution 2From @nicolaskruchten 's https://plotly.slack.com/archives/C07MRPNHW/p1579705647015700
This one is in PR #4506 As pointed out in #4506 (comment),
and in #4506 (comment)
To me, solution 1 appears more robust, but also more complicated to implement. But, it sounds like we could get solution 2 to work by finding the set of attributes that we need to "copy over" and by finding a way to remind us to potentially add attributes to that set whenever we add new cartesian axis features. @archmoj would it be ok if I take a shot at implementing solution 1 and see just how "complicated" it gets? |
@etpinard |
This is a pretty problematic case for Plotly.py: https://codepen.io/nicolaskruchten/pen/ExaOMRr?editable=true
In this case, all axes have
matches
set to the first axis (x
ory
) but those axes have no traces, so no information is being shared among the axes that do have traces.I'd be tempted to call this a bug... thoughts @alexcjohnson @archmoj ?
This is a problem for Plotly.py because
make_subplots
creates subplots and setsmatches
before knowing which subplots have traces.The text was updated successfully, but these errors were encountered: