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

Skip to content

Commit 40e0c0c

Browse files
anntzerMeeseeksDev[bot]
authored andcommitted
Backport PR #14658: Fix numpydoc formatting
1 parent 9a5473d commit 40e0c0c

6 files changed

Lines changed: 32 additions & 35 deletions

File tree

lib/matplotlib/animation.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def setup(self, fig, outfile, dpi=None):
195195
196196
Parameters
197197
----------
198-
fig : `matplotlib.figure.Figure` instance
198+
fig : `~matplotlib.figure.Figure`
199199
The figure object that contains the information for frames
200200
outfile : string
201201
The filename of the resulting movie file
@@ -332,9 +332,9 @@ def setup(self, fig, outfile, dpi=None):
332332
333333
Parameters
334334
----------
335-
fig : matplotlib.figure.Figure
335+
fig : `~matplotlib.figure.Figure`
336336
The figure object that contains the information for frames
337-
outfile : string
337+
outfile : str
338338
The filename of the resulting movie file
339339
dpi : int, optional
340340
The DPI (or resolution) for the file. This controls the size
@@ -442,7 +442,7 @@ def setup(self, fig, outfile, dpi=None, frame_prefix='_tmp',
442442
443443
Parameters
444444
----------
445-
fig : matplotlib.figure.Figure
445+
fig : `~matplotlib.figure.Figure`
446446
The figure to grab the rendered frames from.
447447
outfile : str
448448
The filename of the resulting movie file.
@@ -895,7 +895,7 @@ class Animation(object):
895895
896896
Parameters
897897
----------
898-
fig : matplotlib.figure.Figure
898+
fig : `~matplotlib.figure.Figure`
899899
The figure object that is used to get draw, resize, and any
900900
other needed events.
901901
@@ -1398,7 +1398,7 @@ class TimedAnimation(Animation):
13981398
13991399
Parameters
14001400
----------
1401-
fig : matplotlib.figure.Figure
1401+
fig : `~matplotlib.figure.Figure`
14021402
The figure object that is used to get draw, resize, and any
14031403
other needed events.
14041404
@@ -1481,7 +1481,7 @@ class ArtistAnimation(TimedAnimation):
14811481
14821482
Parameters
14831483
----------
1484-
fig : matplotlib.figure.Figure
1484+
fig : `~matplotlib.figure.Figure`
14851485
The figure object that is used to get draw, resize, and any
14861486
other needed events.
14871487
@@ -1558,7 +1558,7 @@ class FuncAnimation(TimedAnimation):
15581558
15591559
Parameters
15601560
----------
1561-
fig : matplotlib.figure.Figure
1561+
fig : `~matplotlib.figure.Figure`
15621562
The figure object that is used to get draw, resize, and any
15631563
other needed events.
15641564

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,14 +1020,13 @@ def axvspan(self, xmin, xmax, ymin=0, ymax=1, **kwargs):
10201020
10211021
Returns
10221022
-------
1023-
rectangle : matplotlib.patches.Polygon
1023+
rectangle : `~matplotlib.patches.Polygon`
10241024
Vertical span (rectangle) from (xmin, ymin) to (xmax, ymax).
10251025
10261026
Other Parameters
10271027
----------------
10281028
**kwargs
1029-
Optional parameters are properties of the class
1030-
matplotlib.patches.Polygon.
1029+
Optional parameters are properties of the class `.Polygon`.
10311030
10321031
See Also
10331032
--------

lib/matplotlib/projections/polar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,11 +445,11 @@ class _ThetaShift(mtransforms.ScaledTranslation):
445445
446446
Parameters
447447
----------
448-
axes : matplotlib.axes.Axes
448+
axes : `~matplotlib.axes.Axes`
449449
The owning axes; used to determine limits.
450450
pad : float
451451
The padding to apply, in points.
452-
start : str, {'min', 'max', 'rlabel'}
452+
mode : {'min', 'max', 'rlabel'}
453453
Whether to shift away from the start (``'min'``) or the end (``'max'``)
454454
of the axes, or using the rlabel position (``'rlabel'``).
455455
"""

lib/matplotlib/text.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,14 +1630,14 @@ def set_transform(self, t):
16301630
16311631
Parameters
16321632
----------
1633-
t : matplotlib.transforms.Transform
1633+
t : `~matplotlib.transforms.Transform`
16341634
"""
16351635
Text.set_transform(self, t)
16361636
self.dashline.set_transform(t)
16371637
self.stale = True
16381638

16391639
def get_figure(self):
1640-
'return the figure instance the artist belongs to'
1640+
"""Return the figure instance the artist belongs to."""
16411641
return self.figure
16421642

16431643
def set_figure(self, fig):
@@ -1646,7 +1646,7 @@ def set_figure(self, fig):
16461646
16471647
Parameters
16481648
----------
1649-
fig : matplotlib.figure.Figure
1649+
fig : `~matplotlib.figure.Figure`
16501650
"""
16511651
Text.set_figure(self, fig)
16521652
self.dashline.set_figure(fig)

lib/matplotlib/tri/triinterpolate.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,28 +1309,28 @@ def _cg(A, b, x0=None, tol=1.e-10, maxiter=1000):
13091309
13101310
Parameters
13111311
----------
1312-
A: _Sparse_Matrix_coo
1312+
A : _Sparse_Matrix_coo
13131313
*A* must have been compressed before by compress_csc or
13141314
compress_csr method.
13151315
1316-
b: array
1316+
b : array
13171317
Right hand side of the linear system.
13181318
13191319
Returns
13201320
-------
1321-
x: array.
1321+
x : array
13221322
The converged solution.
1323-
err: float
1323+
err : float
13241324
The absolute error np.linalg.norm(A.dot(x) - b)
13251325
13261326
Other parameters
13271327
----------------
1328-
x0: array.
1328+
x0 : array
13291329
Starting guess for the solution.
1330-
tol: float.
1330+
tol : float
13311331
Tolerance to achieve. The algorithm terminates when the relative
13321332
residual is below tol.
1333-
maxiter: integer.
1333+
maxiter : integer
13341334
Maximum number of iterations. Iteration will stop
13351335
after maxiter steps even if the specified tolerance has not
13361336
been achieved.

lib/matplotlib/widgets.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,8 @@ def __init__(self, ax, label, image=None,
155155
"""
156156
Parameters
157157
----------
158-
ax : matplotlib.axes.Axes
159-
The :class:`matplotlib.axes.Axes` instance the button
160-
will be placed into.
158+
ax : `~matplotlib.axes.Axes`
159+
The `~.axes.Axes` instance the button will be placed into.
161160
162161
label : str
163162
The button text. Accepts string.
@@ -168,10 +167,10 @@ def __init__(self, ax, label, image=None,
168167
matplotlib Image instance, or Pillow Image).
169168
170169
color : color
171-
The color of the button when not activated
170+
The color of the button when not activated.
172171
173172
hovercolor : color
174-
The color of the button when the mouse is over it
173+
The color of the button when the mouse is over it.
175174
"""
176175
AxesWidget.__init__(self, ax)
177176

@@ -692,24 +691,23 @@ def __init__(self, ax, label, initial='',
692691
"""
693692
Parameters
694693
----------
695-
ax : matplotlib.axes.Axes
696-
The :class:`matplotlib.axes.Axes` instance the button
697-
will be placed into.
694+
ax : `~matplotlib.axes.Axes`
695+
The `~.axes.Axes` instance the button will be placed into.
698696
699697
label : str
700698
Label for this text box. Accepts string.
701699
702700
initial : str
703-
Initial value in the text box
701+
Initial value in the text box.
704702
705703
color : color
706-
The color of the box
704+
The color of the box.
707705
708706
hovercolor : color
709-
The color of the box when the mouse is over it
707+
The color of the box when the mouse is over it.
710708
711709
label_pad : float
712-
the distance between the label and the right side of the textbox
710+
The distance between the label and the right side of the textbox.
713711
"""
714712
AxesWidget.__init__(self, ax)
715713

0 commit comments

Comments
 (0)