Skip to content

Commit bd3e77f

Browse files
BUG: fontsize parameter of plot only affects one axis.
1 parent 7bd1b24 commit bd3e77f

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
@@ -1691,13 +1691,13 @@ def test_plot_bar(self):
16911691
self._check_ticks_props(ax, xrot=90)
16921692

16931693
ax = df.plot(kind='bar', rot=35, fontsize=10)
1694-
self._check_ticks_props(ax, xrot=35, xlabelsize=10)
1694+
self._check_ticks_props(ax, xrot=35, xlabelsize=10, ylabelsize=10)
16951695

16961696
ax = _check_plot_works(df.plot, kind='barh')
16971697
self._check_ticks_props(ax, yrot=0)
16981698

16991699
ax = df.plot(kind='barh', rot=55, fontsize=11)
1700-
self._check_ticks_props(ax, yrot=55, ylabelsize=11)
1700+
self._check_ticks_props(ax, yrot=55, ylabelsize=11, xlabelsize=11)
17011701

17021702
def _check_bar_alignment(self, df, kind='bar', stacked=False,
17031703
subplots=False, align='center',
@@ -2061,7 +2061,7 @@ def test_kde_df(self):
20612061
self._check_ticks_props(ax, xrot=0)
20622062

20632063
ax = df.plot(kind='kde', rot=20, fontsize=5)
2064-
self._check_ticks_props(ax, xrot=20, xlabelsize=5)
2064+
self._check_ticks_props(ax, xrot=20, xlabelsize=5, ylabelsize=5)
20652065

20662066
axes = _check_plot_works(df.plot, kind='kde', subplots=True)
20672067
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
@@ -2397,9 +2397,9 @@ def _plot(data, x=None, y=None, subplots=False,
23972397
xlim : 2-tuple/list
23982398
ylim : 2-tuple/list
23992399
rot : int, default None
2400-
Rotation for ticks
2400+
Rotation for ticks (xticks for vertical, yticks for horizontal plots)
24012401
fontsize : int, default None
2402-
Font size for ticks
2402+
Font size for xticks and yticks
24032403
colormap : str or matplotlib colormap object, default None
24042404
Colormap to select colors from. If string, load colormap with that name
24052405
from matplotlib.

0 commit comments

Comments
 (0)