|
1 | | -from matplotlib import _api, transforms |
| 1 | +from matplotlib import transforms |
2 | 2 | from matplotlib.offsetbox import (AnchoredOffsetbox, AuxTransformBox, |
3 | 3 | DrawingArea, TextArea, VPacker) |
4 | | -from matplotlib.patches import (Rectangle, Ellipse, ArrowStyle, |
| 4 | +from matplotlib.patches import (Rectangle, ArrowStyle, |
5 | 5 | FancyArrowPatch, PathPatch) |
6 | 6 | from matplotlib.text import TextPath |
7 | 7 |
|
8 | 8 | __all__ = ['AnchoredDrawingArea', 'AnchoredAuxTransformBox', |
9 | | - 'AnchoredEllipse', 'AnchoredSizeBar', 'AnchoredDirectionArrows'] |
| 9 | + 'AnchoredSizeBar', 'AnchoredDirectionArrows'] |
10 | 10 |
|
11 | 11 |
|
12 | 12 | class AnchoredDrawingArea(AnchoredOffsetbox): |
@@ -124,54 +124,6 @@ def __init__(self, transform, loc, |
124 | 124 | **kwargs) |
125 | 125 |
|
126 | 126 |
|
127 | | -@_api.deprecated("3.8") |
128 | | -class AnchoredEllipse(AnchoredOffsetbox): |
129 | | - def __init__(self, transform, width, height, angle, loc, |
130 | | - pad=0.1, borderpad=0.1, prop=None, frameon=True, **kwargs): |
131 | | - """ |
132 | | - Draw an anchored ellipse of a given size. |
133 | | -
|
134 | | - Parameters |
135 | | - ---------- |
136 | | - transform : `~matplotlib.transforms.Transform` |
137 | | - The transformation object for the coordinate system in use, i.e., |
138 | | - :attr:`matplotlib.axes.Axes.transData`. |
139 | | - width, height : float |
140 | | - Width and height of the ellipse, given in coordinates of |
141 | | - *transform*. |
142 | | - angle : float |
143 | | - Rotation of the ellipse, in degrees, anti-clockwise. |
144 | | - loc : str |
145 | | - Location of the ellipse. Valid locations are |
146 | | - 'upper left', 'upper center', 'upper right', |
147 | | - 'center left', 'center', 'center right', |
148 | | - 'lower left', 'lower center', 'lower right'. |
149 | | - For backward compatibility, numeric values are accepted as well. |
150 | | - See the parameter *loc* of `.Legend` for details. |
151 | | - pad : float, default: 0.1 |
152 | | - Padding around the ellipse, in fraction of the font size. |
153 | | - borderpad : float, default: 0.1 |
154 | | - Border padding, in fraction of the font size. |
155 | | - frameon : bool, default: True |
156 | | - If True, draw a box around the ellipse. |
157 | | - prop : `~matplotlib.font_manager.FontProperties`, optional |
158 | | - Font property used as a reference for paddings. |
159 | | - **kwargs |
160 | | - Keyword arguments forwarded to `.AnchoredOffsetbox`. |
161 | | -
|
162 | | - Attributes |
163 | | - ---------- |
164 | | - ellipse : `~matplotlib.patches.Ellipse` |
165 | | - Ellipse patch drawn. |
166 | | - """ |
167 | | - self._box = AuxTransformBox(transform) |
168 | | - self.ellipse = Ellipse((0, 0), width, height, angle=angle) |
169 | | - self._box.add_artist(self.ellipse) |
170 | | - |
171 | | - super().__init__(loc, pad=pad, borderpad=borderpad, child=self._box, |
172 | | - prop=prop, frameon=frameon, **kwargs) |
173 | | - |
174 | | - |
175 | 127 | class AnchoredSizeBar(AnchoredOffsetbox): |
176 | 128 | def __init__(self, transform, size, label, loc, |
177 | 129 | pad=0.1, borderpad=0.1, sep=2, |
|
0 commit comments