Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f30e583

Browse files
committed
added test for issue #10267, yaxis tick label left/right
1 parent 8013fe7 commit f30e583

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

lib/matplotlib/tests/test_axes.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5224,6 +5224,20 @@ def test_axes_tick_params_gridlines():
52245224
assert axis.majorTicks[0]._grid_linestyle == 'dashdot'
52255225

52265226

5227+
def test_axes_tick_params_ylabelside():
5228+
# Tests fix for issue 10267
5229+
ax = plt.subplot()
5230+
ax.tick_params(labelleft=False, labelright=True,
5231+
which='major')
5232+
ax.tick_params(labelleft=False, labelright=True,
5233+
which='minor')
5234+
# expects left false, right true
5235+
assert(ax.yaxis.majorTicks[0].label1On is False)
5236+
assert(ax.yaxis.majorTicks[0].label2On is True)
5237+
assert(ax.yaxis.minorTicks[0].label1On is False)
5238+
assert(ax.yaxis.minorTicks[0].label2On is True)
5239+
5240+
52275241
def test_none_kwargs():
52285242
fig, ax = plt.subplots()
52295243
ln, = ax.plot(range(32), linestyle=None)

0 commit comments

Comments
 (0)