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

Function test_shared_axes_clear

lib/matplotlib/tests/test_axes.py:9222–9233  ·  view source on GitHub ↗
(fig_test, fig_ref)

Source from the content-addressed store, hash-verified

9220
9221@check_figures_equal()
9222def test_shared_axes_clear(fig_test, fig_ref):
9223 x = np.arange(0.0, 2*np.pi, 0.01)
9224 y = np.sin(x)
9225
9226 axs = fig_ref.subplots(2, 2, sharex=True, sharey=True)
9227 for ax in axs.flat:
9228 ax.plot(x, y)
9229
9230 axs = fig_test.subplots(2, 2, sharex=True, sharey=True)
9231 for ax in axs.flat:
9232 ax.clear()
9233 ax.plot(x, y)
9234
9235
9236def test_shared_axes_retick():

Callers

nothing calls this directly

Calls 3

subplotsMethod · 0.45
plotMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…