Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
rcomer merged 1 commit intomatplotlib:mainfromtimhoffm:doc-scalar-float
Jan 11, 2025
Merged
Show file tree
Hide file tree
Changes fromall 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 deletionslib/matplotlib/artist.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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.
"""
ifalphaisnotNoneandnotisinstance(alpha,Real):
Expand All@@ -1035,7 +1035,7 @@ def _set_alpha_for_array(self, alpha):
Parameters
----------
alpha : array-like orscalar or None
alpha : array-like orfloat 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 deletionslib/matplotlib/axes/_axes.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1613,7 +1613,7 @@ def plot(self, *args, scalex=True, scaley=True, data=None, **kwargs):

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

Expand DownExpand 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 DownExpand 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,orNone, default:None
bottom : array-likeorfloat, 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 deletionslib/matplotlib/backend_bases.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionslib/matplotlib/backends/backend_mixed.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 deletionslib/matplotlib/colors.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -743,7 +743,7 @@ def __call__(self, X, alpha=None, bytes=False):
r"""
Parameters
----------
X : float or int, `~numpy.ndarray`orscalar
X : float or intorarray-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 DownExpand Up@@ -771,7 +771,7 @@ def _get_rgba_and_mask(self, X, alpha=None, bytes=False):
r"""
Parameters
----------
X : float or int, `~numpy.ndarray`orscalar
X : float or intorarray-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 DownExpand 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`orscalar
X : tuple (X0, X1), X0 and X1: float or int orarray-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

[8]ページ先頭

©2009-2025 Movatter.jp