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

Function test_shared_axes_autoscale

lib/matplotlib/tests/test_axes.py:7631–7645  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7629
7630
7631def test_shared_axes_autoscale():
7632 l = np.arange(-80, 90, 40)
7633 t = np.random.random_sample((l.size, l.size))
7634
7635 fig, (ax1, ax2) = plt.subplots(2, 1, sharex=True, sharey=True)
7636
7637 ax1.set_xlim(-1000, 1000)
7638 ax1.set_ylim(-1000, 1000)
7639 ax1.contour(l, l, t)
7640
7641 ax2.contour(l, l, t)
7642 assert not ax1.get_autoscalex_on() and not ax2.get_autoscalex_on()
7643 assert not ax1.get_autoscaley_on() and not ax2.get_autoscaley_on()
7644 assert ax1.get_xlim() == ax2.get_xlim() == (-1000, 1000)
7645 assert ax1.get_ylim() == ax2.get_ylim() == (-1000, 1000)
7646
7647
7648def test_adjust_numtick_aspect():

Callers

nothing calls this directly

Calls 6

subplotsMethod · 0.45
set_xlimMethod · 0.45
set_ylimMethod · 0.45
contourMethod · 0.45
get_xlimMethod · 0.45
get_ylimMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…