()
| 848 | |
| 849 | @image_comparison(['annulus.png'], style='mpl20') |
| 850 | def test_annulus_setters2(): |
| 851 | |
| 852 | fig, ax = plt.subplots() |
| 853 | cir = Annulus((0., 0.), 0.2, 0.01, fc='g') # circular annulus |
| 854 | ell = Annulus((0., 0.), (1, 2), 0.1, 0, # elliptical |
| 855 | fc='m', ec='b', alpha=0.5, hatch='xxx') |
| 856 | ax.add_patch(cir) |
| 857 | ax.add_patch(ell) |
| 858 | ax.set_aspect('equal') |
| 859 | |
| 860 | cir.center = (0.5, 0.5) |
| 861 | cir.set_semimajor(0.2) |
| 862 | cir.set_semiminor(0.2) |
| 863 | assert cir.radii == (0.2, 0.2) |
| 864 | cir.width = 0.05 |
| 865 | |
| 866 | ell.center = (0.5, 0.5) |
| 867 | ell.set_semimajor(0.5) |
| 868 | ell.set_semiminor(0.3) |
| 869 | assert ell.radii == (0.5, 0.3) |
| 870 | ell.width = 0.1 |
| 871 | ell.angle = 45 |
| 872 | |
| 873 | |
| 874 | def test_degenerate_polygon(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…