Parameters ---------- xy : (float, float) xy coordinates of annulus centre. r : float or (float, float) The radius, or semi-axes: - If float: radius of the outer circle. - If two floats: semi-major and -minor axes of o
(self, xy, r, width, angle=0.0, **kwargs)
| 1885 | |
| 1886 | @_docstring.interpd |
| 1887 | def __init__(self, xy, r, width, angle=0.0, **kwargs): |
| 1888 | """ |
| 1889 | Parameters |
| 1890 | ---------- |
| 1891 | xy : (float, float) |
| 1892 | xy coordinates of annulus centre. |
| 1893 | r : float or (float, float) |
| 1894 | The radius, or semi-axes: |
| 1895 | |
| 1896 | - If float: radius of the outer circle. |
| 1897 | - If two floats: semi-major and -minor axes of outer ellipse. |
| 1898 | width : float |
| 1899 | Width (thickness) of the annular ring. The width is measured inward |
| 1900 | from the outer ellipse so that for the inner ellipse the semi-axes |
| 1901 | are given by ``r - width``. *width* must be less than or equal to |
| 1902 | the semi-minor axis. |
| 1903 | angle : float, default: 0 |
| 1904 | Rotation angle in degrees (anti-clockwise from the positive |
| 1905 | x-axis). Ignored for circular annuli (i.e., if *r* is a scalar). |
| 1906 | **kwargs |
| 1907 | Keyword arguments control the `Patch` properties: |
| 1908 | |
| 1909 | %(Patch:kwdoc)s |
| 1910 | """ |
| 1911 | super().__init__(**kwargs) |
| 1912 | |
| 1913 | self.set_radii(r) |
| 1914 | self.center = xy |
| 1915 | self.width = width |
| 1916 | self.angle = angle |
| 1917 | self._path = None |
| 1918 | |
| 1919 | def __str__(self): |
| 1920 | if self.a == self.b: |