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

DOC: Use float instead for scalar for type descriptions in docstrings #29457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 4 lib/matplotlib/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ def set_alpha(self, alpha):

Parameters
----------
alpha : scalar or None
alpha : float or None
*alpha* must be within the 0-1 range, inclusive.
"""
if alpha is not None and not isinstance(alpha, Real):
Expand All @@ -1035,7 +1035,7 @@ def _set_alpha_for_array(self, alpha):

Parameters
----------
alpha : array-like or scalar or None
alpha : array-like or float or None
All values must be within the 0-1 range, inclusive.
Masked values and nans are not supported.
"""
Expand Down
12 changes: 6 additions & 6 deletions 12 lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1613,7 +1613,7 @@ def plot(self, *args, scalex=True, scaley=True, data=None, **kwargs):

Parameters
----------
x, y : array-like or scalar
x, y : array-like or float
The horizontal / vertical coordinates of the data points.
*x* values are optional and default to ``range(len(y))``.

Expand Down Expand Up @@ -4231,13 +4231,13 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=None,
A list of dictionaries containing stats for each boxplot.
Required keys are:

- ``med``: Median (scalar).
- ``q1``, ``q3``: First & third quartiles (scalars).
- ``whislo``, ``whishi``: Lower & upper whisker positions (scalars).
- ``med``: Median (float).
- ``q1``, ``q3``: First & third quartiles (float).
- ``whislo``, ``whishi``: Lower & upper whisker positions (float).

Optional keys are:

- ``mean``: Mean (scalar). Needed if ``showmeans=True``.
- ``mean``: Mean (float). Needed if ``showmeans=True``.
- ``fliers``: Data beyond the whiskers (array-like).
Needed if ``showfliers=True``.
- ``cilo``, ``cihi``: Lower & upper confidence intervals
Expand Down Expand Up @@ -6872,7 +6872,7 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
``True``, then the histogram is normalized such that the first bin
equals 1.

bottom : array-like, scalar, or None, default: None
bottom : array-like or float, default: 0
Location of the bottom of each bin, i.e. bins are drawn from
``bottom`` to ``bottom + hist(x, bins)`` If a scalar, the bottom
of each bin is shifted by the same amount. If an array, each bin
Expand Down
4 changes: 2 additions & 2 deletions 4 lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,11 +428,11 @@ def draw_image(self, gc, x, y, im, transform=None):
gc : `.GraphicsContextBase`
A graphics context with clipping information.

x : scalar
x : float
The distance in physical units (i.e., dots or pixels) from the left
hand side of the canvas.

y : scalar
y : float
The distance in physical units (i.e., dots or pixels) from the
bottom side of the canvas.

Expand Down
4 changes: 2 additions & 2 deletions 4 lib/matplotlib/backends/backend_mixed.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ def __init__(self, figure, width, height, dpi, vector_renderer,
----------
figure : `~matplotlib.figure.Figure`
The figure instance.
width : scalar
width : float
The width of the canvas in logical units
height : scalar
height : float
The height of the canvas in logical units
dpi : float
The dpi of the canvas
Expand Down
6 changes: 3 additions & 3 deletions 6 lib/matplotlib/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ def __call__(self, X, alpha=None, bytes=False):
r"""
Parameters
----------
X : float or int, `~numpy.ndarray` or scalar
X : float or int or array-like
The data value(s) to convert to RGBA.
For floats, *X* should be in the interval ``[0.0, 1.0]`` to
return the RGBA values ``X*100`` percent along the Colormap line.
Expand Down Expand Up @@ -771,7 +771,7 @@ def _get_rgba_and_mask(self, X, alpha=None, bytes=False):
r"""
Parameters
----------
X : float or int, `~numpy.ndarray` or scalar
X : float or int or array-like
The data value(s) to convert to RGBA.
For floats, *X* should be in the interval ``[0.0, 1.0]`` to
return the RGBA values ``X*100`` percent along the Colormap line.
Expand Down Expand Up @@ -1609,7 +1609,7 @@ def __call__(self, X, alpha=None, bytes=False):
r"""
Parameters
----------
X : tuple (X0, X1), X0 and X1: float or int `~numpy.ndarray` or scalar
X : tuple (X0, X1), X0 and X1: float or int or array-like
The data value(s) to convert to RGBA.

- For floats, *X* should be in the interval ``[0.0, 1.0]`` to
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.