Skip to content

Commit aaa74a5

Browse files
committed
DOC added constrained layout to plt.figure
1 parent cc7e3a4 commit aaa74a5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/matplotlib/pyplot.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,15 @@ def figure(num=None, # autoincrement if None, else integer from 1-N
457457
``h_pad``, and ``rect``, the default `.tight_layout` paddings
458458
will be overridden.
459459
460+
constrained_layout : bool, default: :rc:`figure.constrained_layout.use`
461+
If ``True`` use constrained layout to adjust positioning of plot
462+
elements. Like ``tight_layout``, but designed to be more
463+
flexible. See
464+
:doc:`/tutorials/intermediate/constrainedlayout_guide`
465+
for examples. (Note: does not work with `add_subplot` or
466+
`~.pyplot.subplot2grid`.)
467+
468+
460469
**kwargs : optional
461470
See `~.matplotlib.figure.Figure` for other possible arguments.
462471

0 commit comments

Comments
 (0)