From d555682cfc70836b166a9d315504e915c8dcb5b7 Mon Sep 17 00:00:00 2001 From: Clark Fitzgerald Date: Thu, 2 Jul 2015 10:31:31 -0700 Subject: [PATCH] ENH: GH10485 'Frequency' label for Series.plot --- doc/source/whatsnew/v0.17.0.txt | 2 ++ pandas/tests/test_graphics.py | 4 ++-- pandas/tools/plotting.py | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/source/whatsnew/v0.17.0.txt b/doc/source/whatsnew/v0.17.0.txt index 08222ef06d21f..05b69bae42c28 100644 --- a/doc/source/whatsnew/v0.17.0.txt +++ b/doc/source/whatsnew/v0.17.0.txt @@ -143,3 +143,5 @@ Bug Fixes - Bug in `Series.from_csv` with ``header`` kwarg not setting the ``Series.name`` or the ``Series.index.name`` (:issue:`10483`) - Bug in `groupby.var` which caused variance to be inaccurate for small float values (:issue:`10448`) + +- Bug in ``Series.plot(kind='hist')`` Y Label not informative (:issue:`10485`) diff --git a/pandas/tests/test_graphics.py b/pandas/tests/test_graphics.py index 2fbb4dfc6fd91..d72bc420b2388 100644 --- a/pandas/tests/test_graphics.py +++ b/pandas/tests/test_graphics.py @@ -1001,12 +1001,12 @@ def test_kde_missing_vals(self): def test_hist_kwargs(self): ax = self.ts.plot(kind='hist', bins=5) self.assertEqual(len(ax.patches), 5) - self._check_text_labels(ax.yaxis.get_label(), 'Degree') + self._check_text_labels(ax.yaxis.get_label(), 'Frequency') tm.close() if self.mpl_ge_1_3_1: ax = self.ts.plot(kind='hist', orientation='horizontal') - self._check_text_labels(ax.xaxis.get_label(), 'Degree') + self._check_text_labels(ax.xaxis.get_label(), 'Frequency') tm.close() ax = self.ts.plot(kind='hist', align='left', stacked=True) diff --git a/pandas/tools/plotting.py b/pandas/tools/plotting.py index 3265889e4b268..07d7ced02e6ba 100644 --- a/pandas/tools/plotting.py +++ b/pandas/tools/plotting.py @@ -2005,10 +2005,10 @@ def _make_plot(self): def _post_plot_logic(self): if self.orientation == 'horizontal': for ax in self.axes: - ax.set_xlabel('Degree') + ax.set_xlabel('Frequency') else: for ax in self.axes: - ax.set_ylabel('Degree') + ax.set_ylabel('Frequency') @property def orientation(self):