Skip to content

Commit 775ad94

Browse files
RishabhSparkjklymak
authored andcommitted
added layout="compressed" for pyplot #25223 (#25234)
* layout none and compressed added in pyplot * Update lib/matplotlib/pyplot.py Co-authored-by: Jody Klymak <jklymak@gmail.com> * compressed added * fixed (89>88) error ig(?) --------- Co-authored-by: Jody Klymak <jklymak@gmail.com>
1 parent 4c1a859 commit 775ad94

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

lib/matplotlib/figure.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2156,7 +2156,7 @@ def __init__(self, parent, subplotspec, *,
21562156
be placed.
21572157
21582158
facecolor : default: ``"none"``
2159-
Transparent face color.
2159+
The figure patch face color; transparent by default.
21602160
21612161
edgecolor : default: :rc:`figure.edgecolor`
21622162
The figure patch edge color.

lib/matplotlib/pyplot.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -740,7 +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', `.LayoutEngine`, None}, default: None
743+
layout : {'constrained', 'tight', 'compressed', \
744+
`.LayoutEngine`, None}, default: None
744745
The layout mechanism for positioning of plot elements to avoid
745746
overlapping Axes decorations (labels, ticks, etc). Note that layout
746747
managers can measurably slow down figure display. Defaults to *None*

lib/matplotlib/tests/test_figure.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def test_suptitle_fontproperties():
288288

289289

290290
@image_comparison(['figure_suptitle_subfigures'],
291-
extensions=['png'])
291+
extensions=['png'], style='mpl20')
292292
def test_suptitle_subfigures():
293293
fig = plt.figure(figsize=(4, 3))
294294
sf1, sf2 = fig.subfigures(1, 2)

0 commit comments

Comments
 (0)