Skip to content

tight_layout() compatibility #6

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

Merged
merged 2 commits into from
Aug 7, 2022
Merged

tight_layout() compatibility #6

merged 2 commits into from
Aug 7, 2022

Conversation

dschwoerer
Copy link
Collaborator

Makes control placement compatible with tight_layout() method or
constrained_layout option. Falls back on previous absolute placement
method if the gridspec version fails for any reason.
Previously was getting gridspec from current axes. This could result in
getting only a subplot, not the top gridspec from the figure. Workaround
depends on interal _gridspecs member of Figure, which is not ideal but
support for editing existing gridspecs in matplotlib is non-existant.
@dschwoerer dschwoerer merged commit ffd11cb into main Aug 7, 2022
@dschwoerer dschwoerer deleted the tight_layout branch August 7, 2022 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants