MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_ytick_rotation_mode

Function test_ytick_rotation_mode

lib/matplotlib/tests/test_text.py:1175–1189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1173
1174@image_comparison(['ytick_rotation_mode.png'], remove_text=False, style='mpl20')
1175def test_ytick_rotation_mode():
1176 fig, ax = plt.subplots(figsize=(1, 12))
1177 ax.set_xticks([])
1178 ax2 = ax.twinx()
1179
1180 ax.set_yticks(range(37), ['foo'] * 37, rotation_mode="ytick")
1181 ax2.set_yticks(range(37), ['foo'] * 37, rotation_mode='ytick')
1182
1183 angles = np.linspace(0, 360, 37)
1184 for tick, angle in zip(ax.get_yticklabels(), angles):
1185 tick.set_rotation(angle)
1186 for tick, angle in zip(ax2.get_yticklabels(), angles):
1187 tick.set_rotation(angle)
1188
1189 plt.subplots_adjust(left=0.4, right=0.6, top=.99, bottom=.01)
1190
1191
1192def test_text_tightbbox_outside_scale_domain():

Callers

nothing calls this directly

Calls 6

set_xticksMethod · 0.80
set_yticksMethod · 0.80
set_rotationMethod · 0.80
subplots_adjustMethod · 0.80
subplotsMethod · 0.45
twinxMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…