Skip to content

Commit 531735e

Browse files
committed
add layout='none' option to Figure constructor [skip appveyor] [skip github] [skip azp]
1 parent 17db60b commit 531735e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/matplotlib/figure.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2420,7 +2420,8 @@ def __init__(self,
24202420
The use of this parameter is discouraged. Please use
24212421
``layout='constrained'`` instead.
24222422
2423-
layout : {'constrained', 'compressed', 'tight', `.LayoutEngine`, None}
2423+
layout : {'constrained', 'compressed', 'tight', 'none', `.LayoutEngine`, \
2424+
None}, default: None
24242425
The layout mechanism for positioning of plot elements to avoid
24252426
overlapping Axes decorations (labels, ticks, etc). Note that
24262427
layout managers can have significant performance penalties.
@@ -2442,6 +2443,8 @@ def __init__(self,
24422443
decorations do not overlap. See `.Figure.set_tight_layout` for
24432444
further details.
24442445
2446+
- 'none': Do not use a layout engine.
2447+
24452448
- A `.LayoutEngine` instance. Builtin layout classes are
24462449
`.ConstrainedLayoutEngine` and `.TightLayoutEngine`, more easily
24472450
accessible by 'constrained' and 'tight'. Passing an instance

lib/matplotlib/pyplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,8 +740,8 @@ def figure(num=None, # autoincrement if None, else integer from 1-N
740740
clear : bool, default: False
741741
If True and the figure already exists, then it is cleared.
742742
743-
layout : {'constrained', 'tight', 'compressed', \
744-
`.LayoutEngine`, None}, default: None
743+
layout : {'constrained', 'compressed', 'tight', 'none', `.LayoutEngine`, None}, \
744+
default: None
745745
The layout mechanism for positioning of plot elements to avoid
746746
overlapping Axes decorations (labels, ticks, etc). Note that layout
747747
managers can measurably slow down figure display. Defaults to *None*

0 commit comments

Comments
 (0)