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

Skip to content

Commit 8cc0c57

Browse files
committed
Fix some ACCEPTS strings.
Note that the syntax used puts the ACCEPTS string in a rst comment, so they won't appear in the rendered docs. They need to be put higher than the Parameters table because numpydoc does not handle rst comments correctly...
1 parent ff84154 commit 8cc0c57

File tree

8 files changed

+238
-59
lines changed

8 files changed

+238
-59
lines changed

lib/matplotlib/artist.py

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,14 @@ def is_transform_set(self):
302302

303303
def set_transform(self, t):
304304
"""
305-
Set the :class:`~matplotlib.transforms.Transform` instance
306-
used by this artist.
305+
Set the artist transform.
307306
308-
ACCEPTS: :class:`~matplotlib.transforms.Transform` instance
307+
Parameters
308+
----------
309+
t : `~.Transform`
310+
311+
..
312+
ACCEPTS: `~.Transform`
309313
"""
310314
self._transform = t
311315
self._transformSet = True
@@ -523,6 +527,9 @@ def set_snap(self, snap):
523527
segments, round to the nearest pixel center
524528
525529
Only supported by the Agg and MacOSX backends.
530+
531+
..
532+
ACCEPTS: Optional[bool]
526533
"""
527534
self._snap = snap
528535
self.stale = True
@@ -553,6 +560,9 @@ def set_sketch_params(self, scale=None, length=None, randomness=None):
553560
"""
554561
Sets the sketch parameters.
555562
563+
..
564+
ACCEPTS: (scale: float, length: float, randomness: float)
565+
556566
Parameters
557567
----------
558568
@@ -576,9 +586,14 @@ def set_sketch_params(self, scale=None, length=None, randomness=None):
576586
self.stale = True
577587

578588
def set_path_effects(self, path_effects):
579-
"""
580-
set path_effects, which should be a list of instances of
581-
matplotlib.patheffect._Base class or its derivatives.
589+
"""Set the path effects.
590+
591+
..
592+
ACCEPTS: `~.AbstractPathEffect`
593+
594+
Parameters
595+
----------
596+
path_effects : `~.AbstractPathEffect`
582597
"""
583598
self._path_effects = path_effects
584599
self.stale = True
@@ -762,13 +777,21 @@ def set_rasterized(self, rasterized):
762777
self._rasterized = rasterized
763778

764779
def get_agg_filter(self):
765-
"return filter function to be used for agg filter"
780+
"""Return filter function to be used for agg filter."""
766781
return self._agg_filter
767782

768783
def set_agg_filter(self, filter_func):
769-
"""
770-
set agg_filter function.
784+
"""Set the agg filter.
771785
786+
..
787+
ACCEPTS: a filter function, which takes a (m, n, 3) float array and
788+
a dpi value, and returns a (m, n, 3) array
789+
790+
Parameters
791+
----------
792+
filter_func : callable
793+
A filter function, which takes a (m, n, 3) float array and a dpi
794+
value, and returns a (m, n, 3) array.
772795
"""
773796
self._agg_filter = filter_func
774797
self.stale = True

0 commit comments

Comments
 (0)