()
| 566 | @image_comparison(['connection_patch.png'], style='mpl20', remove_text=True, |
| 567 | tol=0 if platform.machine() == 'x86_64' else 0.024) |
| 568 | def 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() |
nothing calls this directly
no test coverage detected
searching dependent graphs…