8000 Merge pull request #12435 from timhoffm/fix-numpydoc-parmeters-format · matplotlib/matplotlib@8ca36cb · GitHub
[go: up one dir, main page]

Skip to content

Commit 8ca36cb

Browse files
authored
Merge pull request #12435 from timhoffm/fix-numpydoc-parmeters-format
Fix numpydoc parameter formatting
2 parents 9cffe0e + 802c3f4 commit 8ca36cb

30 files changed

+106
-104
lines changed

examples/specialty_plots/leftventricle_bulleye.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
2121
ax : axes
2222
data : list of int and float
2323
The intensity values for each of the 17 segments
24-
segBold: list of int, optional
24+
segBold : list of int, optional
2525
A list with the segments to highlight
2626
cmap : ColorMap or None, optional
2727
Optional argument to set the desired colormap

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ def rcdefaults():
11921192
11931193
See Also
11941194
--------
1195-
rc_file_defaults :
1195+
rc_file_defaults
11961196
Restore the rc params from the rc file originally loaded by Matplotlib.
11971197
matplotlib.style.use :
11981198
Use a specific style file. Call ``style.use('default')`` to restore

lib/matplotlib/_constrained_layout.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ def do_constrained_layout(fig, renderer, h_pad, w_pad,
8989
----------
9090
9191
92-
fig: Figure
92+
fig : Figure
9393
is the ``figure`` instance to do the layout in.
9494
95-
renderer: Renderer
95+
renderer : Renderer
9696
the renderer to use.
9797
9898
h_pad, w_pad : float

lib/matplotlib/animation.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@ def setup(self, fig, outfile, dpi=None):
195195
196196
Parameters
197197
----------
198-
fig: `matplotlib.figure.Figure` instance
198+
fig : `matplotlib.figure.Figure` instance
199199
The figure object that contains the information for frames
200-
outfile: string
200+
outfile : string
201201
The filename of the resulting movie file
202-
dpi: int, optional
202+
dpi : int, optional
203203
The DPI (or resolution) for the file. This controls the size
204204
in pixels of the resulting movie file. Default is ``fig.dpi``.
205205
'''
@@ -254,22 +254,22 @@ def __init__(self, fps=5, codec=None, bitrate=None, extra_args=None,
254254
255255
Parameters
256256
----------
257-
fps: int
257+
fps : int
258258
Framerate for movie.
259-
codec: string or None, optional
259+
codec : string or None, optional
260260
The codec to use. If ``None`` (the default) the ``animation.codec``
261261
rcParam is used.
262-
bitrate: int or None, optional
262+
bitrate : int or None, optional
263263
The bitrate for the saved movie file, which is one way to control
264264
the output file size and quality. The default value is ``None``,
265265
which uses the ``animation.bitrate`` rcParam. A value of -1
266266
implies that the bitrate should be determined automatically by the
267267
underlying utility.
268-
extra_args: list of strings or None, optional
268+
extra_args : list of strings or None, optional
269269
A list of extra string arguments to be passed to the underlying
270270
movie utility. The default is ``None``, which passes the additional
271271
arguments in the ``animation.extra_args`` rcParam.
272-
metadata: Dict[str, str] or None
272+
metadata : Dict[str, str] or None
273273
A dictionary of keys and values for metadata to include in the
274274
output file. Some keys that may be of use include:
275275
title, artist, genre, subject, copyright, srcform, comment.

lib/matplotlib/axes/_axes.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -537,10 +537,10 @@ def indicate_inset(self, bounds, inset_ax=None, *, transform=None,
537537
Returns
538538
-------
539539
540-
rectangle_patch: `.Patches.Rectangle`
540+
rectangle_patch : `.Patches.Rectangle`
541541
Rectangle artist.
542542
543-
connector_lines: 4-tuple of `.Patches.ConnectionPatch`
543+
connector_lines : 4-tuple of `.Patches.ConnectionPatch`
544544
One for each of four connector lines. Two are set with visibility
545545
to *False*, but the user can set the visibility to True if the
546546
automatic choice is not deemed correct.
@@ -616,10 +616,10 @@ def indicate_inset_zoom(self, inset_ax, **kwargs):
616616
Returns
617617
-------
618618
619-
rectangle_patch: `.Patches.Rectangle`
619+
rectangle_patch : `.Patches.Rectangle`
620620
Rectangle artist.
621621
622-
connector_lines: 4-tuple of `.Patches.ConnectionPatch`
622+
connector_lines : 4-tuple of `.Patches.ConnectionPatch`
623623
One for each of four connector lines. Two are set with visibility
624624
to *False*, but the user can set the visibility to True if the
625625
automatic choice is not deemed correct.
@@ -753,7 +753,7 @@ def axhline(self, y=0, xmin=0, xmax=1, **kwargs):
753753
754754
Other Parameters
755755
----------------
756-
**kwargs :
756+
**kwargs
757757
Valid kwargs are :class:`~matplotlib.lines.Line2D` properties,
758758
with the exception of 'transform':
759759
@@ -823,7 +823,7 @@ def axvline(self, x=0, ymin=0, ymax=1, **kwargs):
823823
824824
Other Parameters
825825
----------------
826-
**kwargs :
826+
**kwargs
827827
Valid kwargs are :class:`~matplotlib.lines.Line2D` properties,
828828
with the exception of 'transform':
829829
@@ -2998,7 +2998,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
29982998
29992999
Other Parameters
30003000
----------------
3001-
**kwargs :
3001+
**kwargs
30023002
All other keyword arguments are passed on to the plot
30033003
command for the markers. For example, this code makes EED3 big red
30043004
squares with thick green edges::
@@ -5657,7 +5657,7 @@ def pcolor(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
56575657
Stroking the edges may be preferred if *alpha* is 1, but will
56585658
cause artifacts otherwise.
56595659
5660-
**kwargs :
5660+
**kwargs
56615661
Additionally, the following arguments are allowed. They are passed
56625662
along to the `~matplotlib.collections.PolyCollection` constructor:
56635663
@@ -6942,7 +6942,7 @@ def psd(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
69426942
69436943
Other Parameters
69446944
----------------
6945-
**kwargs :
6945+
**kwargs
69466946
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
69476947
properties:
69486948
@@ -7067,7 +7067,7 @@ def csd(self, x, y, NFFT=None, Fs=None, Fc=None, detrend=None,
70677067
70687068
Other Parameters
70697069
----------------
7070-
**kwargs :
7070+
**kwargs
70717071
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
70727072
properties:
70737073
@@ -7165,7 +7165,7 @@ def magnitude_spectrum(self, x, Fs=None, Fc=None, window=None,
71657165
71667166
Other Parameters
71677167
----------------
7168-
**kwargs :
7168+
**kwargs
71697169
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
71707170
properties:
71717171
@@ -7262,7 +7262,7 @@ def angle_spectrum(self, x, Fs=None, Fc=None, window=None,
72627262
72637263
Other Parameters
72647264 1CF5
----------------
7265-
**kwargs :
7265+
**kwargs
72667266
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
72677267
properties:
72687268
@@ -7344,7 +7344,7 @@ def phase_spectrum(self, x, Fs=None, Fc=None, window=None,
73447344
73457345
Other Parameters
73467346
----------------
7347-
**kwargs :
7347+
**kwargs
73487348
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
73497349
properties:
73507350
@@ -7423,7 +7423,7 @@ def cohere(self, x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
74237423
74247424
Other Parameters
74257425
----------------
7426-
**kwargs :
7426+
**kwargs
74277427
Keyword arguments control the :class:`~matplotlib.lines.Line2D`
74287428
properties:
74297429
@@ -7505,7 +7505,7 @@ def specgram(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
75057505
when a signal is acquired and then filtered and downsampled to
75067506
baseband.
75077507
7508-
cmap :
7508+
cmap
75097509
A :class:`matplotlib.colors.Colormap` instance; if *None*, use
75107510
default determined by rc
75117511
@@ -7515,7 +7515,7 @@ def specgram(self, x, NFFT=None, Fs=None, Fc=None, detrend=None,
75157515
right border of the last bin. Note that for *noverlap>0* the width
75167516
of the bins is smaller than those of the segments.
75177517
7518-
**kwargs :
7518+
**kwargs
75197519
Additional kwargs are passed on to imshow which makes the
75207520
specgram image.
75217521

lib/matplotlib/axes/_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,7 @@ def add_table(self, tab):
20002000
20012001
Parameters
20022002
----------
2003-
tab: `matplotlib.table.Table`
2003+
tab : `matplotlib.table.Table`
20042004
Table instance
20052005
20062006
Returns
@@ -2350,7 +2350,7 @@ def autoscale(self, enable=True, axis='both', tight=None):
23502350
axis : {'both', 'x', 'y'}, optional
23512351
which axis to operate on; default is 'both'
23522352
2353-
tight: bool or None, optional
2353+
tight : bool or None, optional
23542354
If True, set view limits to data limits;
23552355
if False, let the locator and margins expand the view limits;
23562356
if None, use tight scaling if the only artist is an image,
@@ -2848,7 +2848,7 @@ def locator_params(self, axis='both', tight=None, **kwargs):
28482848
28492849
Other Parameters
28502850
----------------
2851-
**kw :
2851+
**kw
28522852
Remaining keyword arguments are passed to directly to the
28532853
:meth:`~matplotlib.ticker.MaxNLocator.set_params` method.
28542854

lib/matplotlib/axis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ def set_label_text(self, label, fontdict=None, **kwargs):
15271527
Text string.
15281528
fontdict : dict
15291529
Text properties.
1530-
**kwargs :
1530+
**kwargs
15311531
Merged into fontdict.
15321532
"""
15331533
self.isDefault_label = False

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3089,7 +3089,7 @@ def trigger_tool(self, name):
30893089
30903090
Parameters
30913091
----------
3092-
name : String
3092+
name : string
30933093
Name (id) of the tool triggered from within the container
30943094
"""
30953095
self.toolmanager.trigger_tool(name, sender=self)

lib/matplotlib/backend_managers.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ class ToolManager(object):
4646
4747
Attributes
4848
----------
49-
figure: `Figure`
50-
keypresslock: `widgets.LockDraw`
49+
figure : `Figure`
50+
keypresslock : `widgets.LockDraw`
5151
`LockDraw` object to know if the `canvas` key_press_event is locked
52-
messagelock: `widgets.LockDraw`
52+
messagelock : `widgets.LockDraw`
5353
`LockDraw` object to know if the message is available to write
5454
"""
5555

@@ -299,8 +299,8 @@ def _handle_toggle(self, tool, sender, canvasevent, data):
299299
300300
Parameters
301301
----------
302-
tool: Tool object
303-
sender: object
302+
tool : Tool object
303+
sender : object
304304
Object that wishes to trigger the tool
305305
canvasevent : Event
306306
Original Canvas event or None
@@ -363,7 +363,7 @@ def trigger_tool(self, name, sender=None, canvasevent=None,
363363
----------
364364
name : string
365365
Name of the tool
366-
sender: object
366+
sender : object
367367
Object that wishes to trigger the tool
368368
canvasevent : Event
369369
Original Canvas event or None

lib/matplotlib/backend_tools.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ class ToolBase(object):
4141
4242
Attributes
4343
----------
44-
toolmanager: `matplotlib.backend_managers.ToolManager`
44+
toolmanager : `matplotlib.backend_managers.ToolManager`
4545
ToolManager that controls this Tool
46-
figure: `FigureCanvas`
46+
figure : `FigureCanvas`
4747
Figure instance that is affected by this Tool
48-
name: String
48+
name : string
4949
Used as **Id** of the tool, has to be unique among tools of the same
5050
ToolManager
5151
"""
@@ -106,7 +106,7 @@ def set_figure(self, figure):
106106
107107
Parameters
108108
----------
109-
figure: `Figure`
109+
figure : `Figure`
110110
"""
111111
self._figure = figure
112112

@@ -119,11 +119,11 @@ def trigger(self, sender, event, data=None):
119119
120120
Parameters
121121
----------
122-
event: `Event`
122+
event : `Event`
123123
The Canvas event that caused this tool to be called
124-
sender: object
124+
sender : object
125125
Object that requested the tool to be triggered
126-
data: object
126+
data : object
127127
Extra data
128128
"""
129129

@@ -1106,7 +1106,7 @@ def add_tools_to_manager(toolmanager, tools=default_tools):
11061106
11071107
Parameters
11081108
----------
1109-
toolmanager: ToolManager
1109+
toolmanager : ToolManager
11101110
`backend_managers.ToolManager` object that will get the tools added
11111111
tools : {str: class_like}, optional
11121112
The tools to add in a {name: tool} dict, see `add_tool` for more
@@ -1123,7 +1123,7 @@ def add_tools_to_container(container, tools=default_toolbar_tools):
11231123
11241124
Parameters
11251125
----------
1126-
container: Container
1126+
container : Container
11271127
`backend_bases.ToolContainerBase` object that will get the tools added
11281128
tools : list, optional
11291129
List in the form

lib/matplotlib/category.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ def default_units(data, axis):
8989
Parameters
9090
----------
9191
data : string or iterable of strings
92-
axis : :class:`~matplotlib.Axis.axis`
92+
axis : `~matplotlib.Axis.axis`
9393
axis on which the data is plotted
9494
9595
Returns
9696
-------
97-
class:~.UnitData~
97+
class : `.UnitData`
9898
object storing string to integer mapping
9999
"""
100100
# the conversion call stack is supposed to be
@@ -160,8 +160,8 @@ def __init__(self, data=None):
160160
161161
Parameters
162162
----------
163-
data: iterable
164-
sequence of string values
163+
data : iterable
164+
sequence of string values
165165
"""
166166
self._mapping = OrderedDict()
167167
self._counter = itertools.count()
@@ -173,8 +173,8 @@ def update(self, data):
173173
174174
Parameters
175175
----------
176-
data: iterable
177-
sequence of string values
176+
data : iterable
177+
sequence of string values
178178
179179
Raises
180180
------

0 commit comments

Comments
 (0)
0