Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Milestone
Description
Bug summary
Setting 'figure.autolayout' to 'True' removes most of the EPS savefig.
Code for reproduction
importmatplotlib.pyplotaspltplt.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('test2.eps',format='eps')
Actual outcome
Actual image after being exported from gimp (300dpi)
This is the EPS file:
https://we.tl/t-ka6aoUGxKm
Expected outcome
Expect the image in ".eps" file like this.
This is the EPS file:
https://we.tl/t-Q7WBPMwDcy
Additional information
I found this bug by an accident while using a custom ".mplstyle" on Matplotlib 3.5.0
Seems like this rcParam['figure.autolayout'] = 'True'
destroys about 2/3 of the eps file.plt.tightlayout()
seem to not affect the result, the bug happens only with this rcParam on the latest matplotlib version.
importmatplotlib.pyplotaspltplt.plot([1,2,3], [1,2,3],'o-')plt.title(r'$\sum_{i=0}^{\infty} x_i$ just a test')plt.savefig('test2.eps',format='eps')
This is the code for the expected outcome.
Operating system
Windows
Matplotlib Version
Bug present only on 3.5.0
Matplotlib Backend
Qt5Agg
Python version
Tested with 3.10 and 3.9
Jupyter version
No response
Installation
conda