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

Function test_set_ticks_emits_lim_changed

lib/matplotlib/tests/test_axis.py:116–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114
115
116def test_set_ticks_emits_lim_changed():
117 fig, ax1 = plt.subplots()
118 ax1.set_xlim(0.5, 1)
119 called_cartesian = []
120 ax1.callbacks.connect("xlim_changed", called_cartesian.append)
121 ax1.set_xticks([0, 100])
122 assert called_cartesian
123
124 fig = plt.figure()
125 ax2 = fig.add_subplot(projection="polar")
126 ax2.set_ylim(0.5, 1)
127 called_polar = []
128 ax2.callbacks.connect("ylim_changed", called_polar.append)
129 ax2.set_rticks([1, 2, 3])
130 assert called_polar

Callers

nothing calls this directly

Calls 8

set_xticksMethod · 0.80
figureMethod · 0.80
add_subplotMethod · 0.80
set_rticksMethod · 0.80
subplotsMethod · 0.45
set_xlimMethod · 0.45
connectMethod · 0.45
set_ylimMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…