From bd3e77f731fa24a7abba9e78445695084e46be80 Mon Sep 17 00:00:00 2001 From: David Stephens Date: Sun, 9 Nov 2014 15:47:04 -0800 Subject: [PATCH] BUG: fontsize parameter of plot only affects one axis. --- pandas/tests/test_graphics.py | 8 ++++---- pandas/tools/plotting.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pandas/tests/test_graphics.py b/pandas/tests/test_graphics.py index b06342e8ce3c3..b36b79b54b125 100644 --- a/pandas/tests/test_graphics.py +++ b/pandas/tests/test_graphics.py @@ -1230,7 +1230,7 @@ def test_subplots_timeseries(self): self._check_visible(ax.get_xticklabels(minor=True)) self._check_visible(ax.xaxis.get_label()) self._check_visible(ax.get_yticklabels()) - self._check_ticks_props(ax, xlabelsize=7, xrot=45) + self._check_ticks_props(ax, xlabelsize=7, xrot=45, ylabelsize=7) def test_subplots_layout(self): # GH 6667 @@ -1691,13 +1691,13 @@ def test_plot_bar(self): self._check_ticks_props(ax, xrot=90) ax = df.plot(kind='bar', rot=35, fontsize=10) - self._check_ticks_props(ax, xrot=35, xlabelsize=10) + self._check_ticks_props(ax, xrot=35, xlabelsize=10, ylabelsize=10) ax = _check_plot_works(df.plot, kind='barh') self._check_ticks_props(ax, yrot=0) ax = df.plot(kind='barh', rot=55, fontsize=11) - self._check_ticks_props(ax, yrot=55, ylabelsize=11) + self._check_ticks_props(ax, yrot=55, ylabelsize=11, xlabelsize=11) def _check_bar_alignment(self, df, kind='bar', stacked=False, subplots=False, align='center', @@ -2061,7 +2061,7 @@ def test_kde_df(self): self._check_ticks_props(ax, xrot=0) ax = df.plot(kind='kde', rot=20, fontsize=5) - self._check_ticks_props(ax, xrot=20, xlabelsize=5) + self._check_ticks_props(ax, xrot=20, xlabelsize=5, ylabelsize=5) axes = _check_plot_works(df.plot, kind='kde', subplots=True) self._check_axes_shape(axes, axes_num=4, layout=(4, 1)) diff --git a/pandas/tools/plotting.py b/pandas/tools/plotting.py index b9a96ee262101..c302458b9e0d4 100644 --- a/pandas/tools/plotting.py +++ b/pandas/tools/plotting.py @@ -2397,9 +2397,9 @@ def _plot(data, x=None, y=None, subplots=False, xlim : 2-tuple/list ylim : 2-tuple/list rot : int, default None - Rotation for ticks + Rotation for ticks (xticks for vertical, yticks for horizontal plots) fontsize : int, default None - Font size for ticks + Font size for xticks and yticks colormap : str or matplotlib colormap object, default None Colormap to select colors from. If string, load colormap with that name from matplotlib.