FIX: Stop tight layout collapsing under zoom #11742
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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