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

Function test_shared_with_aspect_2

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

Source from the content-addressed store, hash-verified

6420
6421
6422def test_shared_with_aspect_2():
6423 # Share 2 axes only with 'box':
6424 fig, axs = plt.subplots(nrows=2, sharex=True, sharey=True)
6425 axs[0].set_aspect(2, share=True)
6426 axs[0].plot([1, 2], [3, 4])
6427 axs[1].plot([3, 4], [1, 2])
6428 plt.draw() # Trigger apply_aspect().
6429 assert axs[0].get_xlim() == axs[1].get_xlim()
6430 assert axs[0].get_ylim() == axs[1].get_ylim()
6431
6432
6433def test_shared_with_aspect_3():

Callers

nothing calls this directly

Calls 6

subplotsMethod · 0.45
set_aspectMethod · 0.45
plotMethod · 0.45
drawMethod · 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…