FIX: include axis labels in get_tightbbox when not for_layout_only#31932
Open
rcomer wants to merge 1 commit into
Open
FIX: include axis labels in get_tightbbox when not for_layout_only#31932rcomer wants to merge 1 commit into
rcomer wants to merge 1 commit into
Conversation
Member
Author
|
See #31931 for the py312 Ubuntu failure. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #28117 and fixes #31568
This is the rebased branch from #31571, with some modifications for the 3D case and an added fix for the standard axes case. Since 5c75807 we have not been passing
for_layout_only=Falsefrom the axesget_tightbboxdown to the axisget_tightbbox. This PR makes sure that we do by explicitly callingaxis.get_tightbbox()for that case, without the keyword in case we have hold of a third party axis that does not support it.An alternative solution is to modify the
_get_tightbbox_for_layout_onlyhelper function, which I tried at #28117 (comment). I'd be happy to switch to that - I don't have an opinion on which is better.The code from #31568 now gives

The code from #28117 (comment) now gives

Note there is also #31573, but I prefer the solution from #31571 because it leaves the responsibility for the axis labels with the relevant axis.
AI Disclosure
No AI used by me.
PR checklist