Parameters ---------- xy : (float, float) The center of the ellipse. width : float The length of the horizontal axis. height : float The length of the vertical axis. angle : float Rotation of the elli
(self, xy, width, height, *,
angle=0.0, theta1=0.0, theta2=360.0, **kwargs)
| 2123 | |
| 2124 | @_docstring.interpd |
| 2125 | def __init__(self, xy, width, height, *, |
| 2126 | angle=0.0, theta1=0.0, theta2=360.0, **kwargs): |
| 2127 | """ |
| 2128 | Parameters |
| 2129 | ---------- |
| 2130 | xy : (float, float) |
| 2131 | The center of the ellipse. |
| 2132 | |
| 2133 | width : float |
| 2134 | The length of the horizontal axis. |
| 2135 | |
| 2136 | height : float |
| 2137 | The length of the vertical axis. |
| 2138 | |
| 2139 | angle : float |
| 2140 | Rotation of the ellipse in degrees (counterclockwise). |
| 2141 | |
| 2142 | theta1, theta2 : float, default: 0, 360 |
| 2143 | Starting and ending angles of the arc in degrees. These values |
| 2144 | are relative to *angle*, e.g. if *angle* = 45 and *theta1* = 90 |
| 2145 | the absolute starting angle is 135. |
| 2146 | Default *theta1* = 0, *theta2* = 360, i.e. a complete ellipse. |
| 2147 | The arc is drawn in the counterclockwise direction. |
| 2148 | Angles greater than or equal to 360, or smaller than 0, are |
| 2149 | represented by an equivalent angle in the range [0, 360), by |
| 2150 | taking the input value mod 360. |
| 2151 | |
| 2152 | Other Parameters |
| 2153 | ---------------- |
| 2154 | **kwargs : `~matplotlib.patches.Patch` properties |
| 2155 | Most `.Patch` properties are supported as keyword arguments, |
| 2156 | except *fill* and *facecolor* because filling is not supported. |
| 2157 | |
| 2158 | %(Patch:kwdoc)s |
| 2159 | """ |
| 2160 | fill = kwargs.setdefault('fill', False) |
| 2161 | if fill: |
| 2162 | raise ValueError("Arc objects cannot be filled") |
| 2163 | |
| 2164 | super().__init__(xy, width, height, angle=angle, **kwargs) |
| 2165 | |
| 2166 | self.theta1 = theta1 |
| 2167 | self.theta2 = theta2 |
| 2168 | (self._theta1, self._theta2, self._stretched_width, |
| 2169 | self._stretched_height) = self._theta_stretch() |
| 2170 | self._path = Path.arc(self._theta1, self._theta2) |
| 2171 | |
| 2172 | @artist.allow_rasterization |
| 2173 | def draw(self, renderer): |