Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Description
Summary
Summary
Split out of#24617. Before we can implement this, we need a though API discussion (#24617 (comment)).
Current state:
- We have
figure(..., layout=...)
- But
set/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