Skip to content

Commit d555682

Browse files
author
Clark Fitzgerald
committed
ENH: GH10485 'Frequency' label for Series.plot
1 parent bbec57d commit d555682

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

doc/source/whatsnew/v0.17.0.txt

+2
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,5 @@ Bug Fixes
143143
- Bug in `Series.from_csv` with ``header`` kwarg not setting the ``Series.name`` or the ``Series.index.name`` (:issue:`10483`)
144144

145145
- Bug in `groupby.var` which caused variance to be inaccurate for small float values (:issue:`10448`)
146+
147+
- Bug in ``Series.plot(kind='hist')`` Y Label not informative (:issue:`10485`)

pandas/tests/test_graphics.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1001,12 +1001,12 @@ def test_kde_missing_vals(self):
10011001
def test_hist_kwargs(self):
10021002
ax = self.ts.plot(kind='hist', bins=5)
10031003
self.assertEqual(len(ax.patches), 5)
1004-
self._check_text_labels(ax.yaxis.get_label(), 'Degree')
1004+
self._check_text_labels(ax.yaxis.get_label(), 'Frequency')
10051005
tm.close()
10061006

10071007
if self.mpl_ge_1_3_1:
10081008
ax = self.ts.plot(kind='hist', orientation='horizontal')
1009-
self._check_text_labels(ax.xaxis.get_label(), 'Degree')
1009+
self._check_text_labels(ax.xaxis.get_label(), 'Frequency')
10101010
tm.close()
10111011

10121012
ax = self.ts.plot(kind='hist', align='left', stacked=True)

pandas/tools/plotting.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2005,10 +2005,10 @@ def _make_plot(self):
20052005
def _post_plot_logic(self):
20062006
if self.orientation == 'horizontal':
20072007
for ax in self.axes:
2008-
ax.set_xlabel('Degree')
2008+
ax.set_xlabel('Frequency')
20092009
else:
20102010
for ax in self.axes:
2011-
ax.set_ylabel('Degree')
2011+
ax.set_ylabel('Frequency')
20122012

20132013
@property
20142014
def orientation(self):

0 commit comments

Comments
 (0)