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

Function test_axline_transaxes_panzoom

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

Source from the content-addressed store, hash-verified

5718
5719@check_figures_equal()
5720def test_axline_transaxes_panzoom(fig_test, fig_ref):
5721 # test that it is robust against pan/zoom and
5722 # figure resize after plotting
5723 ax = fig_test.subplots()
5724 ax.set(xlim=(-1, 1), ylim=(-1, 1))
5725 ax.axline((0, 0), slope=1, transform=ax.transAxes)
5726 ax.axline((0.5, 0.5), slope=2, color='C1', transform=ax.transAxes)
5727 ax.axline((0.5, 0.5), slope=0, color='C2', transform=ax.transAxes)
5728 ax.set(xlim=(0, 5), ylim=(0, 10))
5729 fig_test.set_size_inches(3, 3)
5730
5731 ax = fig_ref.subplots()
5732 ax.set(xlim=(0, 5), ylim=(0, 10))
5733 fig_ref.set_size_inches(3, 3)
5734 ax.plot([0, 5], [0, 5])
5735 ax.plot([0, 5], [0, 10], color='C1')
5736 ax.plot([0, 5], [5, 5], color='C2')
5737
5738
5739def test_axline_args():

Callers

nothing calls this directly

Calls 5

axlineMethod · 0.80
set_size_inchesMethod · 0.80
subplotsMethod · 0.45
setMethod · 0.45
plotMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…