MCPcopy
hub / github.com/matplotlib/matplotlib / test_toolbar_zoompan

Function test_toolbar_zoompan

lib/matplotlib/tests/test_backend_bases.py:287–296  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

285
286
287def test_toolbar_zoompan():
288 with pytest.warns(UserWarning, match=_EXPECTED_WARNING_TOOLMANAGER):
289 plt.rcParams['toolbar'] = 'toolmanager'
290 ax = plt.gca()
291 fig = ax.get_figure()
292 assert ax.get_navigate_mode() is None
293 fig.canvas.manager.toolmanager.trigger_tool('zoom')
294 assert ax.get_navigate_mode() == "ZOOM"
295 fig.canvas.manager.toolmanager.trigger_tool('pan')
296 assert ax.get_navigate_mode() == "PAN"
297
298
299def test_toolbar_home_restores_autoscale():

Callers

nothing calls this directly

Calls 4

gcaMethod · 0.80
get_navigate_modeMethod · 0.80
get_figureMethod · 0.45
trigger_toolMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…