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

Function test_connection_patch

lib/matplotlib/tests/test_patches.py:568–583  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

566@image_comparison(['connection_patch.png'], style='mpl20', remove_text=True,
567 tol=0 if platform.machine() == 'x86_64' else 0.024)
568def test_connection_patch():
569 fig, (ax1, ax2) = plt.subplots(1, 2)
570
571 con = mpatches.ConnectionPatch(xyA=(0.1, 0.1), xyB=(0.9, 0.9),
572 coordsA='data', coordsB='data',
573 axesA=ax2, axesB=ax1,
574 arrowstyle="->")
575 ax2.add_artist(con)
576
577 xyA = (0.6, 1.0) # in axes coordinates
578 xyB = (0.0, 0.2) # x in axes coordinates, y in data coordinates
579 coordsA = "axes fraction"
580 coordsB = ax2.get_yaxis_transform()
581 con = mpatches.ConnectionPatch(xyA=xyA, xyB=xyB, coordsA=coordsA,
582 coordsB=coordsB, arrowstyle="-")
583 ax2.add_artist(con)
584
585
586@check_figures_equal()

Callers

nothing calls this directly

Calls 3

subplotsMethod · 0.45
add_artistMethod · 0.45
get_yaxis_transformMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…