Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 49b236d

Browse filesBrowse files
authored
Merge pull request #9715 from jklymak/fixsetwidthheight
Change set_figwidth/height to be consistent w/ set_size_inches
2 parents cfb64f4 + 7e0d4ee commit 49b236d
Copy full SHA for 49b236d

File tree

Expand file treeCollapse file tree

2 files changed

+9
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+9
-2
lines changed
+7Lines 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

Copy file name to clipboardExpand all lines: lib/matplotlib/figure.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,15 +836,15 @@ def set_dpi(self, val):
836836
self.dpi = val
837837
self.stale = True
838838

839-
def set_figwidth(self, val, forward=False):
839+
def set_figwidth(self, val, forward=True):
840840
"""
841841
Set the width of the figure in inches
842842
843843
ACCEPTS: float
844844
"""
845845
self.set_size_inches(val, self.get_figheight(), forward=forward)
846846

847-
def set_figheight(self, val, forward=False):
847+
def set_figheight(self, val, forward=True):
848848
"""
849849
Set the height of the figure in inches
850850

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.