()
| 8513 | @image_comparison(['annotate_across_transforms.png'], style='mpl20', remove_text=True, |
| 8514 | tol=0 if platform.machine() == 'x86_64' else 0.025) |
| 8515 | def test_annotate_across_transforms(): |
| 8516 | x = np.linspace(0, 10, 200) |
| 8517 | y = np.exp(-x) * np.sin(x) |
| 8518 | |
| 8519 | fig, ax = plt.subplots(figsize=(3.39, 3)) |
| 8520 | ax.plot(x, y) |
| 8521 | axins = ax.inset_axes([0.4, 0.5, 0.3, 0.3]) |
| 8522 | axins.set_aspect(0.2) |
| 8523 | axins.xaxis.set_visible(False) |
| 8524 | axins.yaxis.set_visible(False) |
| 8525 | ax.annotate("", xy=(x[150], y[150]), xycoords=ax.transData, |
| 8526 | xytext=(1, 0), textcoords=axins.transAxes, |
| 8527 | arrowprops=dict(arrowstyle="->")) |
| 8528 | |
| 8529 | |
| 8530 | class _Translation(mtransforms.Transform): |
nothing calls this directly
no test coverage detected
searching dependent graphs…