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 8bbff6d

Browse filesBrowse files
authored
Merge pull request #17309 from timhoffm/doc-scalar
Cleanup parameter types in docstrings
2 parents baead7d + fb41a33 commit 8bbff6d
Copy full SHA for 8bbff6d

File tree

16 files changed

+117
-120
lines changed
Filter options

16 files changed

+117
-120
lines changed

‎examples/lines_bars_and_markers/filled_step.py

Copy file name to clipboardExpand all lines: examples/lines_bars_and_markers/filled_step.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def filled_hist(ax, edges, values, bottoms=None, orientation='v',
3535
values : array
3636
A length n array of bin counts or values
3737
38-
bottoms : scalar or array, optional
38+
bottoms : float or array, optional
3939
A length n array of the bottom of the bars. If None, zero is used.
4040
4141
orientation : {'v', 'h'}

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+41-45Lines changed: 41 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ def text(self, x, y, s, fontdict=None, **kwargs):
708708
709709
Parameters
710710
----------
711-
x, y : scalars
711+
x, y : float
712712
The position to place the text. By default, this is in data
713713
coordinates. The coordinate system can be changed using the
714714
*transform* parameter.
@@ -1123,14 +1123,14 @@ def hlines(self, y, xmin, xmax, colors='k', linestyles='solid',
11231123
11241124
Parameters
11251125
----------
1126-
y : scalar or sequence of scalar
1126+
y : float or array-like
11271127
y-indexes where to plot the lines.
11281128
1129-
xmin, xmax : scalar or 1D array-like
1129+
xmin, xmax : float or array-like
11301130
Respective beginning and end of each line. If scalars are
11311131
provided, all lines will have same length.
11321132
1133-
colors : array-like of colors, default: 'k'
1133+
colors : list of colors, default: 'k'
11341134
11351135
linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, optional
11361136
@@ -1205,14 +1205,14 @@ def vlines(self, x, ymin, ymax, colors='k', linestyles='solid',
12051205
12061206
Parameters
12071207
----------
1208-
x : scalar or 1D array-like
1208+
x : float or array-like
12091209
x-indexes where to plot the lines.
12101210
1211-
ymin, ymax : scalar or 1D array-like
1211+
ymin, ymax : float or array-like
12121212
Respective beginning and end of each line. If scalars are
12131213
provided, all lines will have same length.
12141214
1215-
colors : array-like of colors, default: 'k'
1215+
colors : list of colors, default: 'k'
12161216
12171217
linestyles : {'solid', 'dashed', 'dashdot', 'dotted'}, optional
12181218
@@ -1312,28 +1312,28 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
13121312
- 'vertical': the lines are arranged vertically in columns,
13131313
and are horizontal.
13141314
1315-
lineoffsets : scalar or sequence of scalars, default: 1
1315+
lineoffsets : float or array-like, default: 1
13161316
The offset of the center of the lines from the origin, in the
13171317
direction orthogonal to *orientation*.
13181318
13191319
A sequence must match the dimension of *positions*
13201320
in the direction of *orientation*.
13211321
1322-
linelengths : scalar or sequence of scalars, default: 1
1322+
linelengths : float or array-like, default: 1
13231323
The total height of the lines (i.e. the lines stretches from
13241324
``lineoffset - linelength/2`` to ``lineoffset + linelength/2``).
13251325
13261326
If a sequence, then *positions* must be 2D and the length
13271327
must match the first dimension of *positions*.
13281328
1329-
linewidths : scalar, scalar sequence or None, default: None
1329+
linewidths : float or array-like or None, default: None
13301330
The line width(s) of the event lines, in points. If it is None,
13311331
defaults to its rcParams setting.
13321332
13331333
If a sequence, then *positions* must be 2D and the length
13341334
must match the first dimension of *positions*.
13351335
1336-
colors : color, sequence of colors or None, default: None
1336+
colors : color or list of colors or None, default: None
13371337
The color(s) of the event lines. If it is None, defaults to its
13381338
rcParams setting.
13391339
@@ -3149,10 +3149,10 @@ def errorbar(self, x, y, yerr=None, xerr=None,
31493149
31503150
Parameters
31513151
----------
3152-
x, y : scalar or array-like
3152+
x, y : float or array-like
31533153
The data positions.
31543154
3155-
xerr, yerr : scalar or array-like, shape(N,) or shape(2, N), optional
3155+
xerr, yerr : float or array-like, shape(N,) or shape(2, N), optional
31563156
The errorbar sizes:
31573157
31583158
- scalar: Symmetric +/- values for all data points.
@@ -3178,14 +3178,14 @@ def errorbar(self, x, y, yerr=None, xerr=None,
31783178
The color of the errorbar lines. If None, use the color of the
31793179
line connecting the markers.
31803180
3181-
elinewidth : scalar, default: None
3181+
elinewidth : float, default: None
31823182
The linewidth of the errorbar lines. If None, the linewidth of
31833183
the current style is used.
31843184
3185-
capsize : scalar, default: :rc:`errorbar.capsize`
3185+
capsize : float, default: :rc:`errorbar.capsize`
31863186
The length of the error bar caps in points.
31873187
3188-
capthick : scalar, default: None
3188+
capthick : float, default: None
31893189
An alias to the keyword argument *markeredgewidth* (a.k.a. *mew*).
31903190
This setting is a more sensible name for the property that
31913191
controls the thickness of the error bar cap in points. For
@@ -3611,7 +3611,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
36113611
automatically set to match the positions. Defaults to
36123612
``range(1, N+1)`` where N is the number of boxes to be drawn.
36133613
3614-
widths : scalar or array-like
3614+
widths : float or array-like
36153615
Sets the width of each box either with a scalar or a
36163616
sequence. The default is 0.5, or ``0.15*(distance between
36173617
extreme positions)``, if that is smaller.
@@ -3638,7 +3638,7 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,
36383638
*meanprops* (see below). Not recommended if *shownotches* is also
36393639
True. Otherwise, means will be shown as points.
36403640
3641-
zorder : scalar, default: None
3641+
zorder : float, default: ``Line2D.zorder = 2``
36423642
Sets the zorder of the boxplot.
36433643
36443644
Returns
@@ -3914,7 +3914,7 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
39143914
If True, the tick locations and labels will be adjusted to match the
39153915
boxplot positions.
39163916
3917-
zorder : scalar, default: None
3917+
zorder : float, default: ``Line2D.zorder = 2``
39183918
The zorder of the resulting boxplot.
39193919
39203920
Returns
@@ -4332,14 +4332,14 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
43324332
43334333
Parameters
43344334
----------
4335-
x, y : scalar or array-like, shape (n, )
4335+
x, y : float or array-like, shape (n, )
43364336
The data positions.
43374337
4338-
s : scalar or array-like, shape (n, ), optional
4338+
s : float or array-like, shape (n, ), optional
43394339
The marker size in points**2.
43404340
Default is ``rcParams['lines.markersize'] ** 2``.
43414341
4342-
c : color, sequence, or sequence of colors, optional
4342+
c : color or list of colors or array-like, optional
43434343
The marker color. Possible values:
43444344
43454345
- A single color format string.
@@ -4377,16 +4377,16 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
43774377
*cmap*.
43784378
If *None*, use the default `.colors.Normalize`.
43794379
4380-
vmin, vmax : scalar, default: None
4380+
vmin, vmax : float, default: None
43814381
*vmin* and *vmax* are used in conjunction with the default norm to
43824382
map the color array *c* to the colormap *cmap*. If None, the
43834383
respective min and max of the color array is used.
43844384
It is deprecated to use *vmin*/*vmax* when *norm* is given.
43854385
4386-
alpha : scalar, default: None
4386+
alpha : float, default: None
43874387
The alpha blending value, between 0 (transparent) and 1 (opaque).
43884388
4389-
linewidths : scalar or array-like, default: :rc:`lines.linewidth`
4389+
linewidths : float or array-like, default: :rc:`lines.linewidth`
43904390
The linewidth of the marker edges. Note: The default *edgecolors*
43914391
is 'face'. You may want to change this as well.
43924392
@@ -5419,12 +5419,12 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
54195419
which can be set by *filterrad*. Additionally, the antigrain image
54205420
resize filter is controlled by the parameter *filternorm*.
54215421
5422-
alpha : scalar or array-like, optional
5422+
alpha : float or array-like, optional
54235423
The alpha blending value, between 0 (transparent) and 1 (opaque).
54245424
If *alpha* is an array, the alpha blending values are applied pixel
54255425
by pixel, and *alpha* must have the same shape as *X*.
54265426
5427-
vmin, vmax : scalar, optional
5427+
vmin, vmax : float, optional
54285428
When using scalar data and no explicit *norm*, *vmin* and *vmax*
54295429
define the data range that the colormap covers. By default,
54305430
the colormap covers the complete value range of the supplied
@@ -5441,7 +5441,7 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
54415441
See the :doc:`/tutorials/intermediate/imshow_extent` tutorial for
54425442
examples and a more detailed description.
54435443
5444-
extent : scalars (left, right, bottom, top), optional
5444+
extent : floats (left, right, bottom, top), optional
54455445
The bounding box in data coordinates that the image will fill.
54465446
The image is stretched individually along x and y to fill the box.
54475447
@@ -5722,7 +5722,7 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
57225722
colormap range [0, 1] for mapping to colors. By default, the data
57235723
range is mapped to the colorbar range using linear scaling.
57245724
5725-
vmin, vmax : scalar, default: None
5725+
vmin, vmax : float, default: None
57265726
The colorbar range. If *None*, suitable min/max values are
57275727
automatically chosen by the `~.Normalize` instance (defaults to
57285728
the respective min/max values of *C* in case of the default linear
@@ -5740,7 +5740,7 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
57405740
57415741
The singular form *edgecolor* works as an alias.
57425742
5743-
alpha : scalar, default: None
5743+
alpha : float, default: None
57445744
The alpha blending value of the face color, between 0 (transparent)
57455745
and 1 (opaque). Note: The edgecolor is currently not affected by
57465746
this.
@@ -5953,7 +5953,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
59535953
colormap range [0, 1] for mapping to colors. By default, the data
59545954
range is mapped to the colorbar range using linear scaling.
59555955
5956-
vmin, vmax : scalar, default: None
5956+
vmin, vmax : float, default: None
59575957
The colorbar range. If *None*, suitable min/max values are
59585958
automatically chosen by the `~.Normalize` instance (defaults to
59595959
the respective min/max values of *C* in case of the default linear
@@ -5971,7 +5971,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
59715971
59725972
The singular form *edgecolor* works as an alias.
59735973
5974-
alpha : scalar, default: None
5974+
alpha : float, default: None
59755975
The alpha blending value, between 0 (transparent) and 1 (opaque).
59765976
59775977
shading : {'flat', 'nearest', 'gouraud', 'auto'}, optional
@@ -6201,14 +6201,14 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
62016201
colormap range [0, 1] for mapping to colors. By default, the data
62026202
range is mapped to the colorbar range using linear scaling.
62036203
6204-
vmin, vmax : scalar, default: None
6204+
vmin, vmax : float, default: None
62056205
The colorbar range. If *None*, suitable min/max values are
62066206
automatically chosen by the `~.Normalize` instance (defaults to
62076207
the respective min/max values of *C* in case of the default linear
62086208
scaling).
62096209
It is deprecated to use *vmin*/*vmax* when *norm* is given.
62106210
6211-
alpha : scalar, default: None
6211+
alpha : float, default: None
62126212
The alpha blending value, between 0 (transparent) and 1 (opaque).
62136213
62146214
snap : bool, default: False
@@ -6472,7 +6472,7 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
64726472
If 'horizontal', `~.Axes.barh` will be used for bar-type histograms
64736473
and the *bottom* kwarg will be the left edges.
64746474
6475-
rwidth : scalar or None, default: None
6475+
rwidth : float or None, default: None
64766476
The relative width of the bars as a fraction of the bin width. If
64776477
``None``, automatically compute the width.
64786478
@@ -6842,15 +6842,11 @@ def hist2d(self, x, y, bins=10, range=None, density=False, weights=None,
68426842
weights : array-like, shape (n, ), optional
68436843
An array of values w_i weighing each sample (x_i, y_i).
68446844
6845-
cmin : scalar, default: None
6846-
All bins that has count less than cmin will not be displayed (set
6847-
to NaN before passing to imshow) and these count values in the
6848-
return value count histogram will also be set to nan upon return.
6849-
6850-
cmax : scalar, default: None
6851-
All bins that has count more than cmax will not be displayed (set
6852-
to NaN before passing to imshow) and these count values in the
6853-
return value count histogram will also be set to nan upon return.
6845+
cmin, cmax : float, default: None
6846+
All bins that has count less than *cmin* or more than *cmax* will
6847+
not be displayed (set to NaN before passing to imshow) and these
6848+
count values in the return value count histogram will also be set
6849+
to nan upon return.
68546850
68556851
Returns
68566852
-------
@@ -7784,7 +7780,7 @@ def violinplot(self, dataset, positions=None, vert=True, widths=0.5,
77847780
which stands for the quantiles that will be rendered for that
77857781
violin.
77867782
7787-
points : scalar, default: 100
7783+
points : int, default: 100
77887784
Defines the number of points to evaluate each of the
77897785
gaussian kernel density estimations at.
77907786

‎lib/matplotlib/axes/_base.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_base.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3509,7 +3509,7 @@ def set_ylim(self, bottom=None, top=None, emit=True, auto=False,
35093509
Whether to turn on autoscaling of the y-axis. *True* turns on,
35103510
*False* turns off, *None* leaves unchanged.
35113511
3512-
ymin, ymax : scalar, optional
3512+
ymin, ymax : float, optional
35133513
They are equivalent to bottom and top respectively,
35143514
and it is an error to pass both *ymin* and *bottom* or
35153515
*ymax* and *top*.

‎lib/matplotlib/axes/_secondary_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_secondary_axes.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def set_ylabel(self, ylabel, fontdict=None, labelpad=None, **kwargs):
311311
ylabel : str
312312
The label text.
313313
314-
labelpad : scalar, default: ``self.yaxis.labelpad``
314+
labelpad : float, default: ``self.yaxis.labelpad``
315315
Spacing in points between the label and the y-axis.
316316
317317
Other Parameters

‎lib/matplotlib/cbook/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/cbook/__init__.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1567,7 +1567,7 @@ def index_of(y):
15671567
15681568
Parameters
15691569
----------
1570-
y : scalar or array-like
1570+
y : float or array-like
15711571
15721572
Returns
15731573
-------

‎lib/matplotlib/collections.py

Copy file name to clipboardExpand all lines: lib/matplotlib/collections.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,15 +1474,15 @@ def __init__(self,
14741474
The orientation of the **collection** (the event bars are along
14751475
the orthogonal direction).
14761476
1477-
lineoffset : scalar, default: 0
1477+
lineoffset : float, default: 0
14781478
The offset of the center of the markers from the origin, in the
14791479
direction orthogonal to *orientation*.
14801480
1481-
linelength : scalar, default: 1
1481+
linelength : float, default: 1
14821482
The total height of the marker (i.e. the marker stretches from
14831483
``lineoffset - linelength/2`` to ``lineoffset + linelength/2``).
14841484
1485-
linewidth : scalar or None, default: None
1485+
linewidth : float or None, default: None
14861486
If it is None, defaults to its rcParams setting, in sequence form.
14871487
14881488
color : color, sequence of colors or None, default: None

‎lib/matplotlib/colors.py

Copy file name to clipboardExpand all lines: lib/matplotlib/colors.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,11 +1827,11 @@ def shade(self, data, cmap, norm=None, blend_mode='overlay', vmin=None,
18271827
``func(rgb, illum, **kwargs)``) Additional kwargs supplied
18281828
to this function will be passed on to the *blend_mode*
18291829
function.
1830-
vmin : scalar or None, optional
1830+
vmin : float or None, optional
18311831
The minimum value used in colormapping *data*. If *None* the
18321832
minimum value in *data* is used. If *norm* is specified, then this
18331833
argument will be ignored.
1834-
vmax : scalar or None, optional
1834+
vmax : float or None, optional
18351835
The maximum value used in colormapping *data*. If *None* the
18361836
maximum value in *data* is used. If *norm* is specified, then this
18371837
argument will be ignored.

0 commit comments

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