()
| 8040 | |
| 8041 | |
| 8042 | def test_tick_param_label_rotation(): |
| 8043 | fix, (ax, ax2) = plt.subplots(1, 2) |
| 8044 | ax.plot([0, 1], [0, 1]) |
| 8045 | ax2.plot([0, 1], [0, 1]) |
| 8046 | ax.xaxis.set_tick_params(which='both', rotation=75) |
| 8047 | ax.yaxis.set_tick_params(which='both', rotation=90) |
| 8048 | for text in ax.get_xticklabels(which='both'): |
| 8049 | assert text.get_rotation() == 75 |
| 8050 | assert text.get_rotation_mode() == 'default' |
| 8051 | for text in ax.get_yticklabels(which='both'): |
| 8052 | assert text.get_rotation() == 90 |
| 8053 | assert text.get_rotation_mode() == 'default' |
| 8054 | |
| 8055 | ax2.tick_params(axis='x', labelrotation=53, labelrotation_mode='xtick') |
| 8056 | ax2.tick_params(axis='y', rotation=35, rotation_mode='ytick') |
| 8057 | for text in ax2.get_xticklabels(which='major'): |
| 8058 | assert text.get_rotation() == 53 |
| 8059 | assert text.get_rotation_mode() == 'xtick' |
| 8060 | for text in ax2.get_yticklabels(which='major'): |
| 8061 | assert text.get_rotation() == 35 |
| 8062 | assert text.get_rotation_mode() == 'ytick' |
| 8063 | |
| 8064 | |
| 8065 | @mpl.style.context('default') |
nothing calls this directly
no test coverage detected
searching dependent graphs…