Skip to content

Commit beee1ba

Browse files
committed
docstring formatting fixes.
svn path=/trunk/matplotlib/; revision=5600
1 parent 991263e commit beee1ba

File tree

1 file changed

+36
-29
lines changed

1 file changed

+36
-29
lines changed

lib/matplotlib/artist.py

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323

2424
class Artist(object):
2525
"""
26-
Abstract base class for someone who renders into a FigureCanvas
26+
Abstract base class for someone who renders into a
27+
:class:`FigureCanvas`.
2728
"""
2829

2930
aname = 'Artist'
@@ -52,12 +53,15 @@ def __init__(self):
5253

5354
def remove(self):
5455
"""
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.
5861
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.
6165
6266
Note: there is no support for removing the artist's legend entry.
6367
"""
@@ -134,16 +138,18 @@ def is_transform_set(self):
134138

135139
def set_transform(self, t):
136140
"""
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.
140143
"""
141144
self._transform = t
142145
self._transformSet = True
143146
self.pchanged()
144147

145148
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+
"""
147153
if self._transform is None:
148154
self._transform = IdentityTransform()
149155
return self._transform
@@ -228,26 +234,26 @@ def set_picker(self, picker):
228234
None - picking is disabled for this artist (default)
229235
230236
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
233239
234240
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
241247
242248
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::
245251
246252
hit, props = picker(artist, mouseevent)
247253
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.
251257
252258
ACCEPTS: [None|float|boolean|callable]
253259
"""
@@ -288,17 +294,18 @@ def set_clip_path(self, path, transform=None):
288294
"""
289295
Set the artist's clip path, which may be:
290296
291-
a) a Patch (or subclass) instance
297+
a) a :class:`~matplotlib.patches.Patch` (or subclass) instance
292298
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.
296303
297-
c) None, to remove the clipping path
304+
c) *None*, to remove the clipping path
298305
299306
For efficiency, if the path happens to be an axis-aligned
300307
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*.
302309
303310
ACCEPTS: a Path instance and a Transform instance, a Patch
304311
instance, or None

0 commit comments

Comments
 (0)