()
| 764 | |
| 765 | @image_comparison(["all_quadrants_arcs.svg"], style="mpl20") |
| 766 | def test_rotated_arcs(): |
| 767 | fig, ax_arr = plt.subplots(2, 2, squeeze=False, figsize=(10, 10)) |
| 768 | |
| 769 | scale = 10_000_000 |
| 770 | diag_centers = ((-1, -1), (-1, 1), (1, 1), (1, -1)) |
| 771 | on_axis_centers = ((0, 1), (1, 0), (0, -1), (-1, 0)) |
| 772 | skews = ((2, 2), (2, 1/10), (2, 1/100), (2, 1/1000)) |
| 773 | |
| 774 | for ax, (sx, sy) in zip(ax_arr.ravel(), skews): |
| 775 | k = 0 |
| 776 | for prescale, centers in zip((1 - .0001, (1 - .0001) / np.sqrt(2)), |
| 777 | (on_axis_centers, diag_centers)): |
| 778 | for j, (x_sign, y_sign) in enumerate(centers, start=k): |
| 779 | a = Arc( |
| 780 | (x_sign * scale * prescale, |
| 781 | y_sign * scale * prescale), |
| 782 | scale * sx, |
| 783 | scale * sy, |
| 784 | lw=4, |
| 785 | color=f"C{j}", |
| 786 | zorder=1 + j, |
| 787 | angle=np.rad2deg(np.arctan2(y_sign, x_sign)) % 360, |
| 788 | label=f'big {j}', |
| 789 | gid=f'big {j}' |
| 790 | ) |
| 791 | ax.add_patch(a) |
| 792 | |
| 793 | k = j+1 |
| 794 | ax.set_xlim(-scale / 4000, scale / 4000) |
| 795 | ax.set_ylim(-scale / 4000, scale / 4000) |
| 796 | ax.axhline(0, color="k") |
| 797 | ax.axvline(0, color="k") |
| 798 | ax.set_axis_off() |
| 799 | ax.set_aspect("equal") |
| 800 | |
| 801 | |
| 802 | def test_fancyarrow_shape_error(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…