Skip to content

Change set_figwidth/height to be consistent w/ set_size_inches #9715

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
merged 1 commit into from
Nov 11, 2017
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
7 changes: 7 additions & 0 deletions doc/api/api_changes/2017-11-07-JMK.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
`Figure.set_figwidth` and `Figure.set_figheight` default forward to True
------------------------------------------------------------------------

`matplotlib.Figure.set_figwidth` and `matplotlib.Figure.set_figheight`
had the kwarg `forward=False`
by default, but `Figure.set_size_inches` now defaults to `forward=True`.
This makes these functions conistent.
4 changes: 2 additions & 2 deletions lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,15 +829,15 @@ def set_dpi(self, val):
self.dpi = val
self.stale = True

def set_figwidth(self, val, forward=False):
def set_figwidth(self, val, forward=True):
"""
Set the width of the figure in inches

ACCEPTS: float
"""
self.set_size_inches(val, self.get_figheight(), forward=forward)

def set_figheight(self, val, forward=False):
def set_figheight(self, val, forward=True):
"""
Set the height of the figure in inches

Expand Down