8000 Change set_figwidth/height to be consistent w/ set_size_inches · matplotlib/matplotlib@7e0d4ee · GitHub
[go: up one dir, main page]

Skip to content

Commit 7e0d4ee

Browse files
committed
Change set_figwidth/height to be consistent w/ set_size_inches
1 parent 5cbe37f commit 7e0d4ee

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
`Figure.set_figwidth` and `Figure.set_figheight` default forward to True
2+
------------------------------------------------------------------------
3+
4+
`matplotlib.Figure.set_figwidth` and `matplotlib.Figure.set_figheight`
5+
had the kwarg `forward=False`
6+
by default, but `Figure.set_size_inches` now defaults to `forward=True`.
7+
This makes these functions conistent.

lib/matplotlib/figure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,15 +829,15 @@ def set_dpi(self, val):
829829
self.dpi = val
830830
self.stale = True
831831

832-
def set_figwidth(self, val, forward=False):
832+
def set_figwidth(self, val, forward=True):
833833
"""
834834
Set the width of the figure in inches
835835
836836
ACCEPTS: float
837837
"""
838838
self.set_size_inches(val, self.get_figheight(), forward=forward)
839839

840-
def set_figheight(self, val, forward=False):
840+
def set_figheight(self, val, forward=True):
841841
"""
842842
Set the height of the figure in inches
843843

0 commit comments

Comments
 (0)
0