Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Bug]: EPS savefig messed up by 'figure.autolayout' rcParam on 3.5.0 #21930

Closed
@alex180500

Description

@alex180500

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)

actual

This is the EPS file:
https://we.tl/t-ka6aoUGxKm

Expected outcome

Expect the image in ".eps" file like this.

expected

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp