|
23 | 23 |
|
24 | 24 | class Artist(object): |
25 | 25 | """ |
26 | | - Abstract base class for someone who renders into a FigureCanvas |
| 26 | + Abstract base class for someone who renders into a |
| 27 | + :class:`FigureCanvas`. |
27 | 28 | """ |
28 | 29 |
|
29 | 30 | aname = 'Artist' |
@@ -52,12 +53,15 @@ def __init__(self): |
52 | 53 |
|
53 | 54 | def remove(self): |
54 | 55 | """ |
55 | | - Remove the artist from the figure if possible. The effect will not |
56 | | - be visible until the figure is redrawn, e.g., with ax.draw_idle(). |
57 | | - Call ax.relim() to update the axes limits if desired. |
| 56 | + Remove the artist from the figure if possible. The effect |
| 57 | + will not be visible until the figure is redrawn, e.g., with |
| 58 | + :meth:`matplotlib.axes.Axes.draw_idle`. Call |
| 59 | + :meth:`matplotlib.axes.Axes.relim` to update the axes limits |
| 60 | + if desired. |
58 | 61 |
|
59 | | - Note: relim() will not see collections even if the collection |
60 | | - was added to axes with autolim=True. |
| 62 | + Note: :meth:`~matplotlib.axes.Axes.relim` will not see |
| 63 | + collections even if the collection was added to axes with |
| 64 | + *autolim* = True. |
61 | 65 |
|
62 | 66 | Note: there is no support for removing the artist's legend entry. |
63 | 67 | """ |
@@ -134,16 +138,18 @@ def is_transform_set(self): |
134 | 138 |
|
135 | 139 | def set_transform(self, t): |
136 | 140 | """ |
137 | | - set the Transformation instance used by this artist |
138 | | -
|
139 | | - ACCEPTS: a matplotlib.transform transformation instance |
| 141 | + Set the :class:`~matplotlib.transforms.Transform` instance |
| 142 | + used by this artist. |
140 | 143 | """ |
141 | 144 | self._transform = t |
142 | 145 | self._transformSet = True |
143 | 146 | self.pchanged() |
144 | 147 |
|
145 | 148 | def get_transform(self): |
146 | | - 'return the Transformation instance used by this artist' |
| 149 | + """ |
| 150 | + Return the :class:`~matplotlib.transforms.Transform` |
| 151 | + instance used by this artist. |
| 152 | + """ |
147 | 153 | if self._transform is None: |
148 | 154 | self._transform = IdentityTransform() |
149 | 155 | return self._transform |
@@ -228,26 +234,26 @@ def set_picker(self, picker): |
228 | 234 | None - picking is disabled for this artist (default) |
229 | 235 |
|
230 | 236 | boolean - if True then picking will be enabled and the |
231 | | - artist will fire a pick event if the mouse event is over |
232 | | - the artist |
| 237 | + artist will fire a pick event if the mouse event is over |
| 238 | + the artist |
233 | 239 |
|
234 | 240 | float - if picker is a number it is interpreted as an |
235 | | - epsilon tolerance in points and the the artist will fire |
236 | | - off an event if it's data is within epsilon of the mouse |
237 | | - event. For some artists like lines and patch collections, |
238 | | - the artist may provide additional data to the pick event |
239 | | - that is generated, eg the indices of the data within |
240 | | - epsilon of the pick event |
| 241 | + epsilon tolerance in points and the the artist will fire |
| 242 | + off an event if it's data is within epsilon of the mouse |
| 243 | + event. For some artists like lines and patch collections, |
| 244 | + the artist may provide additional data to the pick event |
| 245 | + that is generated, eg the indices of the data within |
| 246 | + epsilon of the pick event |
241 | 247 |
|
242 | 248 | function - if picker is callable, it is a user supplied |
243 | | - function which determines whether the artist is hit by the |
244 | | - mouse event. |
| 249 | + function which determines whether the artist is hit by the |
| 250 | + mouse event:: |
245 | 251 |
|
246 | 252 | hit, props = picker(artist, mouseevent) |
247 | 253 |
|
248 | | - to determine the hit test. if the mouse event is over the |
249 | | - artist, return hit=True and props is a dictionary of |
250 | | - properties you want added to the PickEvent attributes |
| 254 | + to determine the hit test. if the mouse event is over the |
| 255 | + artist, return hit=True and props is a dictionary of |
| 256 | + properties you want added to the PickEvent attributes. |
251 | 257 |
|
252 | 258 | ACCEPTS: [None|float|boolean|callable] |
253 | 259 | """ |
@@ -288,17 +294,18 @@ def set_clip_path(self, path, transform=None): |
288 | 294 | """ |
289 | 295 | Set the artist's clip path, which may be: |
290 | 296 |
|
291 | | - a) a Patch (or subclass) instance |
| 297 | + a) a :class:`~matplotlib.patches.Patch` (or subclass) instance |
292 | 298 |
|
293 | | - b) a Path instance, in which cas aoptional transform may |
294 | | - be provided, which will be applied to the path before using it |
295 | | - for clipping. |
| 299 | + b) a :class:`~matplotlib.path.Path` instance, in which case |
| 300 | + an optional :class:`~matplotlib.transforms.Transform` |
| 301 | + instance may be provided, which will be applied to the |
| 302 | + path before using it for clipping. |
296 | 303 |
|
297 | | - c) None, to remove the clipping path |
| 304 | + c) *None*, to remove the clipping path |
298 | 305 |
|
299 | 306 | For efficiency, if the path happens to be an axis-aligned |
300 | 307 | rectangle, this method will set the clipping box to the |
301 | | - corresponding rectangle and set the clipping path to None. |
| 308 | + corresponding rectangle and set the clipping path to *None*. |
302 | 309 |
|
303 | 310 | ACCEPTS: a Path instance and a Transform instance, a Patch |
304 | 311 | instance, or None |
|
0 commit comments