Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
FIX: Stop tight layout collapsing under zoom#11742
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
dbe6dbc
to70e7d18
Comparefredrik-1 commentedJul 23, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I don't like this fix but I don't know any really good solution. It break my usual work process and I believe that the behavior is going to feel strange and inconsistent. Labels are going to be clipped sometimes when zooming and the figure is not going to update as expected if you happen to have clicked the zoom button (I believe that I usually has the zoom button active most of the time) and this could be really confusing. I believe that I believe that a better solution would be to ignore the spines when |
Yes, thats correct - when the zoom button is active the axes resizing will stop. I think its pretty arguable whether the axes size should jump around while zooming. An alternative approach is to take the spines out of the layout process for tight layout only by setting them manually to not be in the layout : |
I believe that it is the exact behavior that you want if you use |
70e7d18
tod636914
CompareOK, this version just takes spines out of the layout if tight_layout is called. The only drawback is that they willstill be taken out for |
d636914
tod95d80d
CompareClosing for#11754 |
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
Fixes#11737, and supersedes#11739
We are now consulting all axes children when doing
get_tightbbox
(my fault:#10682), including spines. There is some sort of problem with spines not having there transform set before draw when zoom is being used, and this leads to impossible bbox calculations. (See#11627).This PR adopts the same soln as#11627 and disables
tight_layout
while zoom and pan are active. This will keep the axes the same size during interactive use, which to my mind is preferable to having the axes change size all the time. However, others may disagree w that.This PR also has failing
tight_layouts
just refuse to update the axes positions, whereas before they drew a collapsed axes. Again, in my opinion, drawing something reasonable is better than drawing something that is broken.And use the GUI to zoom. Before this PR, the axes collapsed. Now the axes doesn't change at all because zoom is active.
Note it might be nice to consider when "Zoom" is turned off to trigger a draw, then CL and TL can be made to work.
Of course the original problem is that the transform of the spines is not being set early enough. Not really sure what the soln to that is.
PR Checklist