()
| 1830 | |
| 1831 | @image_comparison(['arc_ellipse'], remove_text=True, style='_classic_test') |
| 1832 | def test_arc_ellipse(): |
| 1833 | xcenter, ycenter = 0.38, 0.52 |
| 1834 | width, height = 1e-1, 3e-1 |
| 1835 | angle = -30 |
| 1836 | |
| 1837 | theta = np.deg2rad(np.arange(360)) |
| 1838 | x = width / 2. * np.cos(theta) |
| 1839 | y = height / 2. * np.sin(theta) |
| 1840 | |
| 1841 | rtheta = np.deg2rad(angle) |
| 1842 | R = np.array([ |
| 1843 | [np.cos(rtheta), -np.sin(rtheta)], |
| 1844 | [np.sin(rtheta), np.cos(rtheta)]]) |
| 1845 | |
| 1846 | x, y = np.dot(R, [x, y]) |
| 1847 | x += xcenter |
| 1848 | y += ycenter |
| 1849 | |
| 1850 | fig = plt.figure() |
| 1851 | ax = fig.add_subplot(211, aspect='auto') |
| 1852 | ax.fill(x, y, alpha=0.2, facecolor='yellow', edgecolor='yellow', |
| 1853 | linewidth=1, zorder=1) |
| 1854 | |
| 1855 | e1 = mpatches.Arc((xcenter, ycenter), width, height, |
| 1856 | angle=angle, linewidth=2, fill=False, zorder=2) |
| 1857 | |
| 1858 | ax.add_patch(e1) |
| 1859 | |
| 1860 | ax = fig.add_subplot(212, aspect='equal') |
| 1861 | ax.fill(x, y, alpha=0.2, facecolor='green', edgecolor='green', zorder=1) |
| 1862 | e2 = mpatches.Arc((xcenter, ycenter), width, height, |
| 1863 | angle=angle, linewidth=2, fill=False, zorder=2) |
| 1864 | |
| 1865 | ax.add_patch(e2) |
| 1866 | |
| 1867 | |
| 1868 | def test_marker_as_markerstyle(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…