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 ee1a599

Browse filesBrowse files
committed
Have set_figheight and set_figwidth call set_size_inches
1 parent 545c2a0 commit ee1a599
Copy full SHA for ee1a599

File tree

Expand file treeCollapse file tree

1 file changed

+4
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-6
lines changed

‎lib/matplotlib/figure.py

Copy file name to clipboardExpand all lines: lib/matplotlib/figure.py
+4-6Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -766,23 +766,21 @@ def set_dpi(self, val):
766766
self.dpi = val
767767
self.stale = True
768768

769-
def set_figwidth(self, val):
769+
def set_figwidth(self, val, **kwargs):
770770
"""
771771
Set the width of the figure in inches
772772
773773
ACCEPTS: float
774774
"""
775-
self.bbox_inches.x1 = val
776-
self.stale = True
775+
self.set_size_inches(val, self.get_figheight(), **kwargs)
777776

778-
def set_figheight(self, val):
777+
def set_figheight(self, val, **kwargs):
779778
"""
780779
Set the height of the figure in inches
781780
782781
ACCEPTS: float
783782
"""
784-
self.bbox_inches.y1 = val
785-
self.stale = True
783+
self.set_size_inches(self.get_figwidth(), val, **kwargs)
786784

787785
def set_frameon(self, b):
788786
"""

0 commit comments

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