()
| 1154 | |
| 1155 | @image_comparison(['xtick_rotation_mode.png'], remove_text=False, style='mpl20') |
| 1156 | def test_xtick_rotation_mode(): |
| 1157 | fig, ax = plt.subplots(figsize=(12, 1)) |
| 1158 | ax.set_yticks([]) |
| 1159 | ax2 = ax.twiny() |
| 1160 | |
| 1161 | ax.set_xticks(range(37), ['foo'] * 37, rotation_mode="xtick") |
| 1162 | ax2.set_xticks(range(37), ['foo'] * 37, rotation_mode="xtick") |
| 1163 | |
| 1164 | angles = np.linspace(0, 360, 37) |
| 1165 | |
| 1166 | for tick, angle in zip(ax.get_xticklabels(), angles): |
| 1167 | tick.set_rotation(angle) |
| 1168 | for tick, angle in zip(ax2.get_xticklabels(), angles): |
| 1169 | tick.set_rotation(angle) |
| 1170 | |
| 1171 | plt.subplots_adjust(left=0.01, right=0.99, top=.6, bottom=.4) |
| 1172 | |
| 1173 | |
| 1174 | @image_comparison(['ytick_rotation_mode.png'], remove_text=False, style='mpl20') |
nothing calls this directly
no test coverage detected
searching dependent graphs…