Skip to content

Get correct renderer for axes_grid1 inset axes with bbox_inches=tight #26291

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 1 commit into from
Jul 12, 2023

Conversation

ksunden
Copy link
Member

@ksunden ksunden commented Jul 12, 2023

PR summary

Closes #26287

Adds the plumbing to thread through the renderer from the axes to the calls which need it.

Added a test which fails on current main, but simply smoke tests that it doesn't raise (saving with bbox_inches=tight to a BytesIO)

PR checklist

@jklymak jklymak merged commit 49f9ab8 into matplotlib:main Jul 12, 2023
@oscargus
Copy link
Member

Should this be marked 3.8 or 3.7.3 (and therefore backported)?

@rcomer rcomer added the PR: bugfix Pull requests that fix identified bugs label Jul 13, 2023
@rcomer rcomer added this to the v3.7.3 milestone Jul 13, 2023
@rcomer
Copy link
Member

rcomer commented Jul 13, 2023

I can’t see any harm in backporting.

@meeseeksdev backport to v3.7.x

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jul 13, 2023
oscargus added a commit that referenced this pull request Jul 13, 2023
…291-on-v3.7.x

Backport PR #26291 on branch v3.7.x (Get correct renderer for axes_grid1 inset axes with bbox_inches=tight)
xylar added a commit to xylar/MPAS-Analysis that referenced this pull request Jul 16, 2023
There is a bug with tight layouts and insets
matplotlib/matplotlib#26291
xylar added a commit to xylar/polaris that referenced this pull request Jul 27, 2023
We don't want to use version 3.7.2 because of a known bug
with tight layouts and insets: matplotlib/matplotlib#26291
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: bugfix Pull requests that fix identified bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Error while creating inset axes using mpl_toolkits.axes_grid1.inset_locator.inset_axes
4 participants