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

Skip to content

Commit 33377ce

Browse files
committed
Enable ticks on some polar plot tests.
This enables checking that they appear correctly rotated.
1 parent 5b8d2df commit 33377ce

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,8 @@ def test_polar_annotations():
382382
verticalalignment='baseline',
383383
)
384384

385+
ax.tick_params(axis='x', tick1On=True, tick2On=True, direction='out')
386+
385387

386388
@image_comparison(baseline_images=['polar_coords'], style='default',
387389
remove_text=True)
@@ -676,6 +678,7 @@ def test_polar_theta_limits():
676678

677679
theta_mins = np.arange(15.0, 361.0, 90.0)
678680
theta_maxs = np.arange(50.0, 361.0, 90.0)
681+
DIRECTIONS = ('out', 'in', 'inout')
679682

680683
fig, axes = plt.subplots(len(theta_mins), len(theta_maxs),
681684
subplot_kw={'polar': True},
@@ -686,9 +689,11 @@ def test_polar_theta_limits():
686689
ax = axes[i, j]
687690
if start < end:
688691
ax.plot(theta, r)
689-
ax.yaxis.set_tick_params(label2On=True)
690692
ax.set_thetamin(start)
691693
ax.set_thetamax(end)
694+
ax.tick_params(tick1On=True, tick2On=True,
695+
direction=DIRECTIONS[i % len(DIRECTIONS)])
696+
ax.yaxis.set_tick_params(label2On=True)
692697
else:
693698
ax.set_visible(False)
694699

0 commit comments

Comments
 (0)