From 7e0d4ee6cc1032d922c987c934bbe8c2f1aed443 Mon Sep 17 00:00:00 2001 From: Jody Klymak Date: Tue, 7 Nov 2017 15:27:56 -0800 Subject: [PATCH] Change set_figwidth/height to be consistent w/ set_size_inches --- doc/api/api_changes/2017-11-07-JMK.rst | 7 +++++++ lib/matplotlib/figure.py | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 doc/api/api_changes/2017-11-07-JMK.rst diff --git a/doc/api/api_changes/2017-11-07-JMK.rst b/doc/api/api_changes/2017-11-07-JMK.rst new file mode 100644 index 000000000000..917fc7a14fea --- /dev/null +++ b/doc/api/api_changes/2017-11-07-JMK.rst @@ -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. diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index 97adf7354d0b..4570c400b13f 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -829,7 +829,7 @@ 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 @@ -837,7 +837,7 @@ def set_figwidth(self, val, forward=False): """ 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