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

Appearance settings

Commit 49e0aef

Browse filesBrowse files
timhoffmmeeseeksmachine
authored andcommitted
Backport PR matplotlib#26636: [Doc] Improve set_layout_engine docs
1 parent 34ff1c8 commit 49e0aef
Copy full SHA for 49e0aef

File tree

1 file changed

+5
-4
lines changed
Filter options

1 file changed

+5
-4
lines changed

‎lib/matplotlib/figure.py

Copy file name to clipboardExpand all lines: lib/matplotlib/figure.py
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2475,7 +2475,7 @@ def __init__(self,
24752475
24762476
- 'tight': Use the tight layout mechanism. This is a relatively
24772477
simple algorithm that adjusts the subplot parameters so that
2478-
decorations do not overlap. See `.Figure.set_tight_layout` for
2478+
decorations do not overlap. See `.set_tight_layout` for
24792479
further details.
24802480
24812481
- 'none': Do not use a layout engine.
@@ -2618,8 +2618,7 @@ def set_layout_engine(self, layout=None, **kwargs):
26182618
26192619
Parameters
26202620
----------
2621-
layout: {'constrained', 'compressed', 'tight', 'none'} or \
2622-
`LayoutEngine` or None
2621+
layout : {'constrained', 'compressed', 'tight', 'none', `.LayoutEngine`, None}
26232622
26242623
- 'constrained' will use `~.ConstrainedLayoutEngine`
26252624
- 'compressed' will also use `~.ConstrainedLayoutEngine`, but with
@@ -2628,6 +2627,8 @@ def set_layout_engine(self, layout=None, **kwargs):
26282627
- 'tight' uses `~.TightLayoutEngine`
26292628
- 'none' removes layout engine.
26302629
2630+
If a `.LayoutEngine` instance, that instance will be used.
2631+
26312632
If `None`, the behavior is controlled by :rc:`figure.autolayout`
26322633
(which if `True` behaves as if 'tight' was passed) and
26332634
:rc:`figure.constrained_layout.use` (which if `True` behaves as if
@@ -2637,7 +2638,7 @@ def set_layout_engine(self, layout=None, **kwargs):
26372638
Users and libraries can define their own layout engines and pass
26382639
the instance directly as well.
26392640
2640-
kwargs: dict
2641+
**kwargs
26412642
The keyword arguments are passed to the layout engine to set things
26422643
like padding and margin sizes. Only used if *layout* is a string.
26432644

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.