Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e09dece

Browse filesBrowse files
authored
Merge pull request #11397 from anntzer/noACCEPTS
Replace ACCEPTS by standard numpydoc params table.
2 parents 61a576b + ff4ac6d commit e09dece
Copy full SHA for e09dece

File tree

Expand file treeCollapse file tree

19 files changed

+410
-283
lines changed
Filter options
Expand file treeCollapse file tree

19 files changed

+410
-283
lines changed

‎lib/matplotlib/artist.py

Copy file name to clipboardExpand all lines: lib/matplotlib/artist.py
+1-19Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ def set_transform(self, t):
301301
Parameters
302302
----------
303303
t : `.Transform`
304-
.. ACCEPTS: `.Transform`
305304
"""
306305
self._transform = t
307306
self._transformSet = True
@@ -373,7 +372,6 @@ def set_contains(self, picker):
373372
Parameters
374373
----------
375374
picker : callable
376-
.. ACCEPTS: a callable function
377375
"""
378376
self._contains = picker
379377

@@ -453,7 +451,6 @@ def set_picker(self, picker):
453451
Parameters
454452
----------
455453
picker : None or bool or float or callable
456-
.. ACCEPTS: [None | bool | float | callable]
457454
"""
458455
self._picker = picker
459456

@@ -477,7 +474,6 @@ def set_url(self, url):
477474
Parameters
478475
----------
479476
url : str
480-
.. ACCEPTS: a url string
481477
"""
482478
self._url = url
483479

@@ -492,7 +488,6 @@ def set_gid(self, gid):
492488
Parameters
493489
----------
494490
gid : str
495-
.. ACCEPTS: an id string
496491
"""
497492
self._gid = gid
498493

@@ -530,7 +525,6 @@ def set_snap(self, snap):
530525
Parameters
531526
----------
532527
snap : bool or None
533-
.. ACCEPTS: bool or None
534528
"""
535529
self._snap = snap
536530
self.stale = True
@@ -591,7 +585,6 @@ def set_path_effects(self, path_effects):
591585
Parameters
592586
----------
593587
path_effects : `.AbstractPathEffect`
594-
.. ACCEPTS: `.AbstractPathEffect`
595588
"""
596589
self._path_effects = path_effects
597590
self.stale = True
@@ -610,7 +603,6 @@ def set_figure(self, fig):
610603
Parameters
611604
----------
612605
fig : `.Figure`
613-
.. ACCEPTS: a `.Figure` instance
614606
"""
615607
# if this is a no-op just return
616608
if self.figure is fig:
@@ -635,7 +627,6 @@ def set_clip_box(self, clipbox):
635627
Parameters
636628
----------
637629
clipbox : `.Bbox`
638-
.. ACCEPTS: a `.Bbox` instance
639630
"""
640631
self.clipbox = clipbox
641632
self.pchanged()
@@ -742,7 +733,6 @@ def set_clip_on(self, b):
742733
Parameters
743734
----------
744735
b : bool
745-
.. ACCEPTS: bool
746736
"""
747737
self._clipon = b
748738
# This may result in the callbacks being hit twice, but ensures they
@@ -773,7 +763,6 @@ def set_rasterized(self, rasterized):
773763
Parameters
774764
----------
775765
rasterized : bool or None
776-
.. ACCEPTS: bool or None
777766
"""
778767
if rasterized and not hasattr(self.draw, "_supports_rasterization"):
779768
warnings.warn("Rasterization of '%s' will be ignored" % self)
@@ -807,13 +796,11 @@ def draw(self, renderer, *args, **kwargs):
807796

808797
def set_alpha(self, alpha):
809798
"""
810-
Set the alpha value used for blending - not supported on
811-
all backends.
799+
Set the alpha value used for blending - not supported on all backends.
812800
813801
Parameters
814802
----------
815803
alpha : float
816-
.. ACCEPTS: float (0.0 transparent through 1.0 opaque)
817804
"""
818805
self._alpha = alpha
819806
self.pchanged()
@@ -826,7 +813,6 @@ def set_visible(self, b):
826813
Parameters
827814
----------
828815
b : bool
829-
.. ACCEPTS: bool
830816
"""
831817
self._visible = b
832818
self.pchanged()
@@ -839,7 +825,6 @@ def set_animated(self, b):
839825
Parameters
840826
----------
841827
b : bool
842-
.. ACCEPTS: bool
843828
"""
844829
if self._animated != b:
845830
self._animated = b
@@ -895,8 +880,6 @@ def set_label(self, s):
895880
----------
896881
s : object
897882
*s* will be converted to a string by calling `str`.
898-
899-
.. ACCEPTS: object
900883
"""
901884
if s is not None:
902885
self._label = str(s)
@@ -917,7 +900,6 @@ def set_zorder(self, level):
917900
Parameters
918901
----------
919902
level : float
920-
.. ACCEPTS: float
921903
"""
922904
if level is None:
923905
level = self.__class__.zorder

‎lib/matplotlib/axes/_base.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_base.py
+4-14Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,11 +1365,9 @@ def set_anchor(self, anchor, share=False):
13651365
anchor defines where the drawing area will be located within the
13661366
available space.
13671367
1368-
.. ACCEPTS: [ 'C' | 'SW' | 'S' | 'SE' | 'E' | 'NE' | 'N' | 'NW' | 'W' ]
1369-
13701368
Parameters
13711369
----------
1372-
anchor : str or 2-tuple of floats
1370+
anchor : 2-tuple of floats or {'C', 'SW', 'S', 'SE', ...}
13731371
The anchor position may be either:
13741372
13751373
- a sequence (*cx*, *cy*). *cx* and *cy* may range from 0
@@ -3147,11 +3145,9 @@ def set_xscale(self, value, **kwargs):
31473145
"""
31483146
Set the x-axis scale.
31493147
3150-
.. ACCEPTS: [ 'linear' | 'log' | 'symlog' | 'logit' | ... ]
3151-
31523148
Parameters
31533149
----------
3154-
value : {"linear", "log", "symlog", "logit"}
3150+
value : {"linear", "log", "symlog", "logit", ...}
31553151
scaling strategy to apply
31563152
31573153
Notes
@@ -3185,8 +3181,6 @@ def set_xticks(self, ticks, minor=False):
31853181
"""
31863182
Set the x ticks with list of *ticks*
31873183
3188-
.. ACCEPTS: list of tick locations.
3189-
31903184
Parameters
31913185
----------
31923186
ticks : list
@@ -3484,11 +3478,9 @@ def set_yscale(self, value, **kwargs):
34843478
"""
34853479
Set the y-axis scale.
34863480
3487-
.. ACCEPTS: [ 'linear' | 'log' | 'symlog' | 'logit' | ... ]
3488-
34893481
Parameters
34903482
----------
3491-
value : {"linear", "log", "symlog", "logit"}
3483+
value : {"linear", "log", "symlog", "logit", ...}
34923484
scaling strategy to apply
34933485
34943486
Notes
@@ -3521,11 +3513,9 @@ def set_yticks(self, ticks, minor=False):
35213513
"""
35223514
Set the y ticks with list of *ticks*
35233515
3524-
.. ACCEPTS: list of tick locations.
3525-
35263516
Parameters
35273517
----------
3528-
ticks : sequence
3518+
ticks : list
35293519
List of y-axis tick locations
35303520
35313521
minor : bool, optional

‎lib/matplotlib/axis.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axis.py
+51-22Lines changed: 51 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ def set_pad(self, val):
251251
"""
252252
Set the tick label pad in points
253253
254-
ACCEPTS: float
254+
Parameters
255+
----------
256+
val : float
255257
"""
256258
self._apply_params(pad=val)
257259
self.stale = True
@@ -308,9 +310,11 @@ def draw(self, renderer):
308310

309311
def set_label1(self, s):
310312
"""
311-
Set the text of ticklabel
313+
Set the label1 text.
312314
313-
ACCEPTS: str
315+
Parameters
316+
----------
317+
s : str
314318
"""
315319
self.label1.set_text(s)
316320
self.stale = True
@@ -319,9 +323,11 @@ def set_label1(self, s):
319323

320324
def set_label2(self, s):
321325
"""
322-
Set the text of ticklabel2
326+
Set the label2 text.
323327
324-
ACCEPTS: str
328+
Parameters
329+
----------
330+
s : str
325331
"""
326332
self.label2.set_text(s)
327333
self.stale = True
@@ -1538,7 +1544,8 @@ def get_units(self):
15381544
return self.units
15391545

15401546
def set_label_text(self, label, fontdict=None, **kwargs):
1541-
""" Sets the text value of the axis label
1547+
"""
1548+
Set the text value of the axis label.
15421549
15431550
ACCEPTS: A string value for the label
15441551
"""
@@ -1552,9 +1559,11 @@ def set_label_text(self, label, fontdict=None, **kwargs):
15521559

15531560
def set_major_formatter(self, formatter):
15541561
"""
1555-
Set the formatter of the major ticker
1562+
Set the formatter of the major ticker.
15561563
1557-
ACCEPTS: A :class:`~matplotlib.ticker.Formatter` instance
1564+
Parameters
1565+
----------
1566+
formatter : ~matplotlib.ticker.Formatter
15581567
"""
15591568
if not isinstance(formatter, mticker.Formatter):
15601569
raise TypeError("formatter argument should be instance of "
@@ -1566,9 +1575,11 @@ def set_major_formatter(self, formatter):
15661575

15671576
def set_minor_formatter(self, formatter):
15681577
"""
1569-
Set the formatter of the minor ticker
1578+
Set the formatter of the minor ticker.
15701579
1571-
ACCEPTS: A :class:`~matplotlib.ticker.Formatter` instance
1580+
Parameters
1581+
----------
1582+
formatter : ~matplotlib.ticker.Formatter
15721583
"""
15731584
if not isinstance(formatter, mticker.Formatter):
15741585
raise TypeError("formatter argument should be instance of "
@@ -1580,9 +1591,11 @@ def set_minor_formatter(self, formatter):
15801591

15811592
def set_major_locator(self, locator):
15821593
"""
1583-
Set the locator of the major ticker
1594+
Set the locator of the major ticker.
15841595
1585-
ACCEPTS: a :class:`~matplotlib.ticker.Locator` instance
1596+
Parameters
1597+
----------
1598+
locator : ~matplotlib.ticker.Locator
15861599
"""
15871600
if not isinstance(locator, mticker.Locator):
15881601
raise TypeError("formatter argument should be instance of "
@@ -1594,9 +1607,11 @@ def set_major_locator(self, locator):
15941607

15951608
def set_minor_locator(self, locator):
15961609
"""
1597-
Set the locator of the minor ticker
1610+
Set the locator of the minor ticker.
15981611
1599-
ACCEPTS: a :class:`~matplotlib.ticker.Locator` instance
1612+
Parameters
1613+
----------
1614+
locator : ~matplotlib.ticker.Locator
16001615
"""
16011616
if not isinstance(locator, mticker.Locator):
16021617
raise TypeError("formatter argument should be instance of "
@@ -1608,9 +1623,11 @@ def set_minor_locator(self, locator):
16081623

16091624
def set_pickradius(self, pickradius):
16101625
"""
1611-
Set the depth of the axis used by the picker
1626+
Set the depth of the axis used by the picker.
16121627
1613-
ACCEPTS: a distance in points
1628+
Parameters
1629+
----------
1630+
pickradius : float
16141631
"""
16151632
self.pickradius = pickradius
16161633

@@ -1749,7 +1766,9 @@ def set_label_position(self, position):
17491766
"""
17501767
Set the label position (top or bottom)
17511768
1752-
ACCEPTS: [ 'top' | 'bottom' ]
1769+
Parameters
1770+
----------
1771+
position : {'top', 'bottom'}
17531772
"""
17541773
raise NotImplementedError()
17551774

@@ -1859,7 +1878,9 @@ def set_label_position(self, position):
18591878
"""
18601879
Set the label position (top or bottom)
18611880
1862-
ACCEPTS: [ 'top' | 'bottom' ]
1881+
Parameters
1882+
----------
1883+
position : {'top', 'bottom'}
18631884
"""
18641885
if position == 'top':
18651886
self.label.set_verticalalignment('baseline')
@@ -1978,7 +1999,9 @@ def set_ticks_position(self, position):
19781999
can be used if you don't want any ticks. 'none' and 'both'
19792000
affect only the ticks, not the labels.
19802001
1981-
ACCEPTS: [ 'top' | 'bottom' | 'both' | 'default' | 'none' ]
2002+
Parameters
2003+
----------
2004+
position : {'top', 'bottom', 'both', 'default', 'none'}
19822005
"""
19832006
if position == 'top':
19842007
self.set_tick_params(which='both', top=True, labeltop=True,
@@ -2226,7 +2249,9 @@ def set_label_position(self, position):
22262249
"""
22272250
Set the label position (left or right)
22282251
2229-
ACCEPTS: [ 'left' | 'right' ]
2252+
Parameters
2253+
----------
2254+
position : {'left', 'right'}
22302255
"""
22312256
self.label.set_rotation_mode('anchor')
22322257
self.label.set_horizontalalignment('center')
@@ -2313,7 +2338,9 @@ def _update_offset_text_position(self, bboxes, bboxes2):
23132338

23142339
def set_offset_position(self, position):
23152340
"""
2316-
.. ACCEPTS: [ 'left' | 'right' ]
2341+
Parameters
2342+
----------
2343+
position : {'left', 'right'}
23172344
"""
23182345
x, y = self.offsetText.get_position()
23192346
if position == 'left':
@@ -2354,7 +2381,9 @@ def set_ticks_position(self, position):
23542381
can be used if you don't want any ticks. 'none' and 'both'
23552382
affect only the ticks, not the labels.
23562383
2357-
ACCEPTS: [ 'left' | 'right' | 'both' | 'default' | 'none' ]
2384+
Parameters
2385+
----------
2386+
position : {'left', 'right', 'both', 'default', 'none'}
23582387
"""
23592388
if position == 'right':
23602389
self.set_tick_params(which='both', right=True, labelright=True,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.