From 369842bb60478d12a18ad6f5ba142dcc1cfaadfb Mon Sep 17 00:00:00 2001 From: Jerry Lui Date: Wed, 21 Mar 2018 22:46:58 -0400 Subject: [PATCH 1/6] change pie chart default shape to circular (instead of oval) --- lib/matplotlib/axes/_axes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index cf64bd20e8c3..44900038e55c 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -2674,6 +2674,8 @@ def pie(self, x, explode=None, labels=None, colors=None, The pie chart will probably look best if the figure and axes are square, or the Axes aspect is equal. """ + self.set_aspect('equal') + x = np.array(x, np.float32) sx = x.sum() From 78c79de8ecc93042805eb33d22412f4d25833513 Mon Sep 17 00:00:00 2001 From: Jerry Lui Date: Mon, 26 Mar 2018 18:56:04 -0400 Subject: [PATCH 2/6] Revert "change pie chart default shape to circular (instead of oval)" This reverts commit 369842bb60478d12a18ad6f5ba142dcc1cfaadfb. --- lib/matplotlib/axes/_axes.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index e8c778d16b41..d476deb356fd 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -2672,8 +2672,6 @@ def pie(self, x, explode=None, labels=None, colors=None, The pie chart will probably look best if the figure and axes are square, or the Axes aspect is equal. """ - self.set_aspect('equal') - x = np.array(x, np.float32) sx = x.sum() From 0747f16ffb737b12582f28624ccf91ff79abf3aa Mon Sep 17 00:00:00 2001 From: Jerry Lui Date: Mon, 26 Mar 2018 19:27:36 -0400 Subject: [PATCH 3/6] tested the change after rebase --- lib/matplotlib/axes/_axes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index d476deb356fd..d0c2321cbf49 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -2672,6 +2672,7 @@ def pie(self, x, explode=None, labels=None, colors=None, The pie chart will probably look best if the figure and axes are square, or the Axes aspect is equal. """ + self.set_aspect('equal') x = np.array(x, np.float32) sx = x.sum() From f2fbc458050b6723623bf78ada690066bc69d37c Mon Sep 17 00:00:00 2001 From: Jerry Lui Date: Wed, 21 Mar 2018 22:46:58 -0400 Subject: [PATCH 4/6] change pie chart default shape to circular (instead of oval) --- lib/matplotlib/axes/_axes.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index d476deb356fd..e8c778d16b41 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -2672,6 +2672,8 @@ def pie(self, x, explode=None, labels=None, colors=None, The pie chart will probably look best if the figure and axes are square, or the Axes aspect is equal. """ + self.set_aspect('equal') + x = np.array(x, np.float32) sx = x.sum() From b6d99e0e727ae35aa71a443f58dfc80d7024df5d Mon Sep 17 00:00:00 2001 From: Jerry Lui Date: Mon, 26 Mar 2018 18:56:04 -0400 Subject: [PATCH 5/6] Revert "change pie chart default shape to circular (instead of oval)" This reverts commit 369842bb60478d12a18ad6f5ba142dcc1cfaadfb. --- lib/matplotlib/axes/_axes.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index e8c778d16b41..d476deb356fd 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -2672,8 +2672,6 @@ def pie(self, x, explode=None, labels=None, colors=None, The pie chart will probably look best if the figure and axes are square, or the Axes aspect is equal. """ - self.set_aspect('equal') - x = np.array(x, np.float32) sx = x.sum() From dc816a0b7499a23e09e6d03dffcda7cb2930599c Mon Sep 17 00:00:00 2001 From: Jerry Lui Date: Mon, 26 Mar 2018 19:27:36 -0400 Subject: [PATCH 6/6] tested the change after rebase --- lib/matplotlib/axes/_axes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index d476deb356fd..d0c2321cbf49 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -2672,6 +2672,7 @@ def pie(self, x, explode=None, labels=None, colors=None, The pie chart will probably look best if the figure and axes are square, or the Axes aspect is equal. """ + self.set_aspect('equal') x = np.array(x, np.float32) sx = x.sum()