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

Function test_zoom_inset_update_limits

lib/matplotlib/tests/test_inset.py:18–36  ·  view source on GitHub ↗
(fig_test, fig_ref)

Source from the content-addressed store, hash-verified

16
17@check_figures_equal()
18def test_zoom_inset_update_limits(fig_test, fig_ref):
19 # Updating the inset axes limits should also update the indicator #19768
20 ax_ref = fig_ref.add_subplot()
21 ax_test = fig_test.add_subplot()
22
23 for ax in ax_ref, ax_test:
24 ax.set_xlim([0, 5])
25 ax.set_ylim([0, 5])
26
27 inset_ref = ax_ref.inset_axes([0.6, 0.6, 0.3, 0.3])
28 inset_test = ax_test.inset_axes([0.6, 0.6, 0.3, 0.3])
29
30 inset_ref.set_xlim([1, 2])
31 inset_ref.set_ylim([3, 4])
32 ax_ref.indicate_inset_zoom(inset_ref)
33
34 ax_test.indicate_inset_zoom(inset_test)
35 inset_test.set_xlim([1, 2])
36 inset_test.set_ylim([3, 4])
37
38
39def test_inset_indicator_update_styles():

Callers

nothing calls this directly

Calls 5

add_subplotMethod · 0.80
inset_axesMethod · 0.80
indicate_inset_zoomMethod · 0.80
set_xlimMethod · 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…