10000 Merge pull request #8008 from tacaswell/doc_document_set_size_inches_… · matplotlib/matplotlib@493cb8a · GitHub
[go: up one dir, main page]

Skip to content

Commit 493cb8a

Browse files
authored
Merge pull request #8008 from tacaswell/doc_document_set_size_inches_forward_change
DOC: add missing docs for change to Figure.set_size_inches
2 parents 654b53b + d9742a4 commit 493cb8a

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

doc/users/dflt_style_changes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,12 @@ or by setting::
256256

257257
In your :file:`matplotlibrc` file.
258258

259+
In addition, the ``forward`` kwarg to
260+
`~matplotlib.Figure.set_size_inches` now defaults to `True` to improve
261+
the interactive experience. Backend canvases that adjust the size of
262+
their bound `matplotlib.figure.Figure` must pass ``forward=False`` to
263+
avoid circular behavior. This default is not configurable.
264+
259265

260266
Plotting functions
261267
==================

lib/matplotlib/figure.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -682,15 +682,12 @@ def figimage(self, X,
682682
return im
683683

684684
def set_size_inches(self, w, h=None, forward=True):
685-
"""
686-
set_size_inches(w,h, forward=False)
687-
688-
Set the figure size in inches (1in == 2.54cm)
685+
"""Set the figure size in inches (1in == 2.54cm)
689686
690-
Usage::
687+
Usage ::
691688
692689
fig.set_size_inches(w,h) # OR
693-
fig.set_size_inches((w,h) )
690+
fig.set_size_inches((w,h))
694691
695692
optional kwarg *forward=True* will cause the canvas size to be
696693
automatically updated; e.g., you can resize the figure window

0 commit comments

Comments
 (0)
0