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

[MNT]: API consistency for Figure layout_engine #29636

Open
@timhoffm

Description

@timhoffm

Summary

Summary

Split out of#24617. Before we can implement this, we need a though API discussion (#24617 (comment)).

Current state:

  • We havefigure(..., layout=...)
  • Butset/get_layout_engine().

I'm opposed to creating an aliasset_layout/set_layout_engine.

We should converge to one name. Whilelayout_engine is more explicitlayout seems good enough. If the name would only be used rarely I'd go with the longer option, but since we don't have a layout engine by default, people must often useplt.subplots(..., layout="constrained") andplt.subplots(..., layout_engine="constrained") is way too long to just create a figure.

Semi-OT: I'm tempted to start a discussion whether we can make constrained layout the default. It is what people would want most of the time, and having to always explicitly enable it is a nuissance. Of course it's a significant change and imacts basically all figures created with matplotlib. OTOH it's "only" a shift of some of the graphic elements, which does not affect the visual expression of the figure - I claim most people would not notice. And if you want the previous behavior, you can set the layout engine to none.

Either way, if we want to move forward on the layout topic, we should agree on one name and slowly phase out the other. At least discourage, but possibly pending deprecate.

Proposed fix

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp