Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Backport PR #22732: FIX: maybe improve renderer dance #22783

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

Conversation

tacaswell
Copy link
Member

Merge pull request #22732 from jklymak/fix-renderer-dance

FIX: improve cached renderer dance
(cherry picked from commit 9e0eb54)

The changes had to be moved to figure.py due to a major refactoring that will
be released in 3.6 that is already on main.

Merge pull request matplotlib#22732 from jklymak/fix-renderer-dance

FIX: improve cached renderer dance
(cherry picked from commit 9e0eb54)

The changes had to be moved to figure.py due to a major refactoring that will
be released in 3.6 that is already on main.
@tacaswell tacaswell added this to the v3.5.2 milestone Apr 4, 2022
@tacaswell
Copy link
Member Author

This should be reviewed carefully because it is essentially a different patch than in #22783 due to code having moved around.

@jklymak
Copy link
Member

jklymak commented Apr 5, 2022

@tacaswell I took the liberty of pushing a typo fix to your branch....

@tacaswell
Copy link
Member Author

I manually tested the two cases again

import matplotlib.pyplot as plt

plt.rcParams['figure.autolayout'] = 'True'

plt.plot([1, 2, 3], [1, 2, 3], 'o-')
plt.title(r'$\sum_{i=0}^{\infty} x_i$ just a test')
plt.savefig('/tmp/test2.eps', format='eps')

(interactively)

from matplotlib import pylab as plt
plt.rcParams['savefig.format'] = 'pdf'
plt.ion()

fig, ax = plt.subplots()
ax.plot([0,1])
fig.tight_layout()

and both appear to work.

@tacaswell tacaswell merged commit 0734a70 into matplotlib:v3.5.x Apr 5, 2022
@tacaswell tacaswell deleted the auto-backport-of-pr-22732-on-v3.5.x branch April 5, 2022 17:45
@tacaswell
Copy link
Member Author

I may have jumped the gun on merging this, sorry about that.

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