8000 DOC: add missing docs for change to Figure.set_size_inches by tacaswell · Pull Request #8008 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

DOC: add missing docs for change to Figure.set_size_inches #8008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/users/dflt_style_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,12 @@ or by setting::

In your :file:`matplotlibrc` file.

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


Plotting functions
==================
Expand Down
9 changes: 3 additions & 6 deletions lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,15 +682,12 @@ def figimage(self, X,
return im

def set_size_inches(self, w, h=None, forward=True):
"""
set_size_inches(w,h, forward=False)

Set the figure size in inches (1in == 2.54cm)
"""Set the figure size in inches (1in == 2.54cm)

Usage::
Usage ::

fig.set_size_inches(w,h) # OR
fig.set_size_inches((w,h) )
fig.set_size_inches((w,h))

optional kwarg *forward=True* will cause the canvas size to be
automatically updated; e.g., you can resize the figure window
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps mention the requirement for backends here and not only in the style-changes documentation?

Expand Down 3A41
0