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

Skip to content

Commit 362ce4a

Browse files
authored
Fix numpydoc formatting (#14658)
Fix numpydoc formatting
2 parents 26290b0 + e834403 commit 362ce4a

File tree

6 files changed

+32
-35
lines changed

6 files changed

+32
-35
lines changed

lib/matplotlib/animation.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def setup(self, fig, outfile, dpi=None):
193193
194194
Parameters
195195
----------
196-
fig : `matplotlib.figure.Figure` instance
196+
fig : `~matplotlib.figure.Figure`
197197
The figure object that contains the information for frames
198198
outfile : string
199199
The filename of the resulting movie file
@@ -330,9 +330,9 @@ def setup(self, fig, outfile, dpi=None):
330330
331331
Parameters
332332
----------
333-
fig : matplotlib.figure.Figure
333+
fig : `~matplotlib.figure.Figure`
334334
The figure object that contains the information for frames
335-
outfile : string
335+
outfile : str
336336
The filename of the resulting movie file
337337
dpi : int, optional
338338
The DPI (or resolution) for the file. This controls the size
@@ -441,7 +441,7 @@ def setup(self, fig, outfile, dpi=None, frame_prefix='_tmp',
441441
442442
Parameters
443443
----------
444-
fig : matplotlib.figure.Figure
444+
fig : `~matplotlib.figure.Figure`
445445
The figure to grab the rendered frames from.
446446
outfile : str
447447
The filename of the resulting movie file.
@@ -889,7 +889,7 @@ class Animation:
889889
890890
Parameters
891891
----------
892-
fig : matplotlib.figure.Figure
892+
fig : `~matplotlib.figure.Figure`
893893
The figure object that is used to get draw, resize, and any
894894
other needed events.
895895
@@ -1391,7 +1391,7 @@ class TimedAnimation(Animation):
13911391
13921392
Parameters
13931393
----------
1394-
fig : matplotlib.figure.Figure
1394+
fig : `~matplotlib.figure.Figure`
13951395
The figure object that is used to get draw, resize, and any
13961396
other needed events.
13971397
@@ -1474,7 +1474,7 @@ class ArtistAnimation(TimedAnimation):
14741474
14751475
Parameters
14761476
----------
1477-
fig : matplotlib.figure.Figure
1477+
fig : `~matplotlib.figure.Figure`
14781478
The figure object that is used to get draw, resize, and any
14791479
other needed events.
14801480
@@ -1551,7 +1551,7 @@ class FuncAnimation(TimedAnimation):
15511551
15521552
Parameters
15531553
----------
1554-
fig : matplotlib.figure.Figure
1554+
fig : `~matplotlib.figure.Figure`
15551555
The figure object that is used to get draw, resize, and any
15561556
other needed events.
15571557

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -993,14 +993,13 @@ def axvspan(self, xmin, xmax, ymin=0, ymax=1, **kwargs):
993993
994994
Returns
995995
-------
996-
rectangle : matplotlib.patches.Polygon
996+
rectangle : `~matplotlib.patches.Polygon`
997997
Vertical span (rectangle) from (xmin, ymin) to (xmax, ymax).
998998
999999
Other Parameters
10001000
----------------
10011001
**kwargs
1002-
Optional parameters are properties of the class
1003-
matplotlib.patches.Polygon.
1002+
Optional parameters are properties of the class `.Polygon`.
10041003
10051004
See Also
10061005
--------

lib/matplotlib/projections/polar.py

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

lib/matplotlib/text.py

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

16381638
def get_figure(self):
1639-
'return the figure instance the artist belongs to'
1639+
"""Return the figure instance the artist belongs to."""
16401640
return self.figure
16411641

16421642
def set_figure(self, fig):
@@ -1645,7 +1645,7 @@ def set_figure(self, fig):
16451645
16461646
Parameters
16471647
----------
1648-
fig : matplotlib.figure.Figure
1648+
fig : `~matplotlib.figure.Figure`
16491649
"""
16501650
Text.set_figure(self, fig)
16511651
self.dashline.set_figure(fig)

lib/matplotlib/tri/triinterpolate.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,28 +1307,28 @@ def _cg(A, b, x0=None, tol=1.e-10, maxiter=1000):
13071307
13081308
Parameters
13091309
----------
1310-
A: _Sparse_Matrix_coo
1310+
A : _Sparse_Matrix_coo
13111311
*A* must have been compressed before by compress_csc or
13121312
compress_csr method.
13131313
1314-
b: array
1314+
b : array
13151315
Right hand side of the linear system.
13161316
13171317
Returns
13181318
-------
1319-
x: array.
1319+
x : array
13201320
The converged solution.
1321-
err: float
1321+
err : float
13221322
The absolute error np.linalg.norm(A.dot(x) - b)
13231323
13241324
Other parameters
13251325
----------------
1326-
x0: array.
1326+
x0 : array
13271327
Starting guess for the solution.
1328-
tol: float.
1328+
tol : float
13291329
Tolerance to achieve. The algorithm terminates when the relative
13301330
residual is below tol.
1331-
maxiter: integer.
1331+
maxiter : integer
13321332
Maximum number of iterations. Iteration will stop
13331333
after maxiter steps even if the specified tolerance has not
13341334
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)