Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0cea2e2

Browse files
committed
Some more docstring fixes.
Axes.pick can be removed as it just inherits Artist.pick.
1 parent 0c16002 commit 0cea2e2

File tree

4 files changed

+15
-55
lines changed

4 files changed

+15
-55
lines changed

lib/matplotlib/artist.py

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -287,23 +287,18 @@ def remove_callback(self, oid):
287287

288288
def pchanged(self):
289289
"""
290-
Fire an event when property changed, calling all of the
291-
registered callbacks.
290+
Fire an event when property changed, calling all registered callbacks.
292291
"""
293292
for oid, func in six.iteritems(self._propobservers):
294293
func(self)
295294

296295
def is_transform_set(self):
297-
"""
298-
Returns *True* if `Artist` has a transform explicitly
299-
set.
300-
"""
296+
"""Return whether this artist has a transform explicitly set."""
301297
return self._transformSet
302298

303299
def set_transform(self, t):
304300
"""
305-
Set the `~matplotlib.transforms.Transform` instance
306-
used by this artist.
301+
Set the `~matplotlib.transforms.Transform` used by this artist.
307302
308303
ACCEPTS: `~matplotlib.transforms.Transform` instance
309304
"""
@@ -313,9 +308,7 @@ def set_transform(self, t):
313308
self.stale = True
314309

315310
def get_transform(self):
316-
"""
317-
Return the `~matplotlib.transforms.Transform`
318-
instance used by this artist.
311+
"""Return the `~matplotlib.transforms.Transform` used by this artist.
319312
"""
320313
if self._transform is None:
321314
self._transform = IdentityTransform()
@@ -343,14 +336,11 @@ def hitlist(self, event):
343336
return L
344337

345338
def get_children(self):
346-
"""
347-
Return a list of the child `Artist`s this
348-
`Artist` contains.
349-
"""
339+
"""Return a list of the child `Artist`s this artist contains."""
350340
return []
351341

352342
def contains(self, mouseevent):
353-
"""Test whether the artist contains the mouse event.
343+
"""Test whether this artist contains the mouse event.
354344
355345
Returns the truth value and a dictionary of artist specific details of
356346
selection, such as which points are contained in the pick radius. See
@@ -384,17 +374,17 @@ def get_contains(self):
384374
return self._contains
385375

386376
def pickable(self):
387-
'Return *True* if `Artist` is pickable.'
377+
"""Return whether the artist is pickable."""
388378
return (self.figure is not None and
389379
self.figure.canvas is not None and
390380
self._picker is not None)
391381

392382
def pick(self, mouseevent):
393383
"""
394-
Process pick event
384+
Process pick event.
395385
396-
each child artist will fire a pick event if *mouseevent* is over
397-
the artist and the artist has picker set
386+
Each child artist will fire a pick event if *mouseevent* is over the
387+
artist and the artist has picker set.
398388
"""
399389
# Pick self
400390
if self.pickable():
@@ -811,9 +801,7 @@ def set_animated(self, b):
811801
self.pchanged()
812802

813803
def update(self, props):
814-
"""
815-
Update the properties of this `Artist` from the
816-
dictionary *prop*.
804+
"""Update the properties of this artist from the dictionary *props*.
817805
"""
818806
def _update_property(self, k, v):
819807
"""sorting out how to update property (setter or setattr)

lib/matplotlib/axes/_axes.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,11 +1882,9 @@ def bar(self, *args, **kwargs):
18821882
"""
18831883
Make a bar plot.
18841884
1885-
Call signatures::
1885+
Call signature::
18861886
1887-
bar(x, height, *, align='center', **kwargs)
1888-
bar(x, height, width, *, align='center', **kwargs)
1889-
bar(x, height, width, bottom, *, align='center', **kwargs)
1887+
bar(x, height, width=0.8, bottom=None, *, align='center', **kwargs)
18901888
18911889
Make a bar plot with rectangles bounded by
18921890
@@ -2212,11 +2210,9 @@ def barh(self, *args, **kwargs):
22122210
"""
22132211
Make a horizontal bar plot.
22142212
2215-
Call signatures::
2213+
Call signature::
22162214
2217-
bar(y, width, *, align='center', **kwargs)
2218-
bar(y, width, height, *, align='center', **kwargs)
2219-
bar(y, width, height, left, *, align='center', **kwargs)
2215+
barh(y, width, height=0.8, left=None, *, align='center', **kwargs)
22202216
22212217
Make a horizontal bar plot with rectangles by default bounded by
22222218

lib/matplotlib/axes/_base.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3882,18 +3882,6 @@ def contains_point(self, point):
38823882
"""
38833883
return self.patch.contains_point(point, radius=1.0)
38843884

3885-
def pick(self, *args):
3886-
"""Trigger pick event
3887-
3888-
Call signature::
3889-
3890-
pick(mouseevent)
3891-
3892-
each child artist will fire a pick event if mouseevent is over
3893-
the artist and the artist has picker set
3894-
"""
3895-
martist.Artist.pick(self, args[0])
3896-
38973885
def get_default_bbox_extra_artists(self):
38983886
return [artist for artist in self.get_children()
38993887
if artist.get_visible()]

lib/matplotlib/figure.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -630,18 +630,6 @@ def figimage(self, X,
630630
"""
631631
Adds a non-resampled image to the figure.
632632
633-
call signatures::
634-
635-
figimage(X, **kwargs)
636-
637-
adds a non-resampled array *X* to the figure.
638-
639-
::
640-
641-
figimage(X, xo, yo)
642-
643-
with pixel offsets *xo*, *yo*,
644-
645633
*X* must be a float array:
646634
647635
* If *X* is MxN, assume luminance (grayscale)

0 commit comments

Comments
 (0)