Skip to content

Commit 53682e3

Browse files
Merge pull request #8766 from dstephens99/issue8765
BUG: fontsize parameter of plot only affects one axis.
2 parents 7ea921e + bd3e77f commit 53682e3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pandas/tests/test_graphics.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ def test_subplots_timeseries(self):
12301230
self._check_visible(ax.get_xticklabels(minor=True))
12311231
self._check_visible(ax.xaxis.get_label())
12321232
self._check_visible(ax.get_yticklabels())
1233-
self._check_ticks_props(ax, xlabelsize=7, xrot=45)
1233+
self._check_ticks_props(ax, xlabelsize=7, xrot=45, ylabelsize=7)
12341234

12351235
def test_subplots_layout(self):
12361236
# GH 6667
@@ -1717,13 +1717,13 @@ def test_plot_bar(self):
17171717
self._check_ticks_props(ax, xrot=90)
17181718

17191719
ax = df.plot(kind='bar', rot=35, fontsize=10)
1720-
self._check_ticks_props(ax, xrot=35, xlabelsize=10)
1720+
self._check_ticks_props(ax, xrot=35, xlabelsize=10, ylabelsize=10)
17211721

17221722
ax = _check_plot_works(df.plot, kind='barh')
17231723
self._check_ticks_props(ax, yrot=0)
17241724

17251725
ax = df.plot(kind='barh', rot=55, fontsize=11)
1726-
self._check_ticks_props(ax, yrot=55, ylabelsize=11)
1726+
self._check_ticks_props(ax, yrot=55, ylabelsize=11, xlabelsize=11)
17271727

17281728
def _check_bar_alignment(self, df, kind='bar', stacked=False,
17291729
subplots=False, align='center',
@@ -2087,7 +2087,7 @@ def test_kde_df(self):
20872087
self._check_ticks_props(ax, xrot=0)
20882088

20892089
ax = df.plot(kind='kde', rot=20, fontsize=5)
2090-
self._check_ticks_props(ax, xrot=20, xlabelsize=5)
2090+
self._check_ticks_props(ax, xrot=20, xlabelsize=5, ylabelsize=5)
20912091

20922092
axes = _check_plot_works(df.plot, kind='kde', subplots=True)
20932093
self._check_axes_shape(axes, axes_num=4, layout=(4, 1))

pandas/tools/plotting.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2413,9 +2413,9 @@ def _plot(data, x=None, y=None, subplots=False,
24132413
xlim : 2-tuple/list
24142414
ylim : 2-tuple/list
24152415
rot : int, default None
2416-
Rotation for ticks
2416+
Rotation for ticks (xticks for vertical, yticks for horizontal plots)
24172417
fontsize : int, default None
2418-
Font size for ticks
2418+
Font size for xticks and yticks
24192419
colormap : str or matplotlib colormap object, default None
24202420
Colormap to select colors from. If string, load colormap with that name
24212421
from matplotlib.

0 commit comments

Comments
 (0)