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]: calling fig.tight_layout multiple times #26290

Closed
Labels
topic: geometry managerLayoutEngine, Constrained layout, Tight layout
Milestone
@tacaswell

Description

@tacaswell

Bug summary

Callingfig.tight_layout() multiple times warns.

Code for reproduction

importmatplotlib.pyplotaspltfig=plt.figure()fig.tight_layout()fig.tight_layout()

Actual outcome

<ipython-input-9-0981ef8afcc1>:5: UserWarning: The figure layout has changed to tight  fig.tight_layout()

Expected outcome

no-warning.

Additional information

does not show up in 3.7.1, does show up in 3.7.2. Have not bisected this yet (or checked main).

From looking at the code I suspect
6a82f38 /#25626 /#25624 which is from me 😞 .

xref#25624

I suspect the fix is to not warn if we set the place holder due tofig.tight_layout.

Operating system

Arch

Matplotlib Version

3.7.2

Matplotlib Backend

any

Python version

3.11

Jupyter version

No response

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: geometry managerLayoutEngine, Constrained layout, Tight layout

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp