Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 10b0b48

Browse files
authored
Merge pull request #16247 from NelleV/figure_doc_tight_layout
DOC added kwargs and tight_layout description in plt.figure
2 parents 58846db + aaa74a5 commit 10b0b48

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

lib/matplotlib/pyplot.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,25 @@ def figure(num=None, # autoincrement if None, else integer from 1-N
533533
clear : bool, default: False
534534
If True and the figure already exists, then it is cleared.
535535
536+
tight_layout : bool or dict, default: :rc:`figure.autolayout`
537+
If ``False`` use *subplotpars*. If ``True`` adjust subplot
538+
parameters using `.tight_layout` with default padding.
539+
When providing a dict containing the keys ``pad``, ``w_pad``,
540+
``h_pad``, and ``rect``, the default `.tight_layout` paddings
541+
will be overridden.
542+
543+
constrained_layout : bool, default: :rc:`figure.constrained_layout.use`
544+
If ``True`` use constrained layout to adjust positioning of plot
545+
elements. Like ``tight_layout``, but designed to be more
546+
flexible. See
547+
:doc:`/tutorials/intermediate/constrainedlayout_guide`
548+
for examples. (Note: does not work with `add_subplot` or
549+
`~.pyplot.subplot2grid`.)
550+
551+
552+
**kwargs : optional
553+
See `~.matplotlib.figure.Figure` for other possible arguments.
554+
536555
Returns
537556
-------
538557
`~matplotlib.figure.Figure`

0 commit comments

Comments
 (0)