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

Skip to content

Commit b5de523

Browse files
committed
Fix casing of RGB(A)
1 parent 84e5f02 commit b5de523

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

lib/matplotlib/cm.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -426,17 +426,17 @@ def _scale_norm(self, norm, vmin, vmax):
426426

427427
def to_rgba(self, x, alpha=None, bytes=False, norm=True):
428428
"""
429-
Return a normalized rgba array corresponding to *x*.
429+
Return a normalized RGBA array corresponding to *x*.
430430
431431
In the normal case, *x* is a 1D or 2D sequence of scalars, and
432-
the corresponding `~numpy.ndarray` of rgba values will be returned,
432+
the corresponding `~numpy.ndarray` of RGBA values will be returned,
433433
based on the norm and colormap set for this ScalarMappable.
434434
435435
There is one special case, for handling images that are already
436-
rgb or rgba, such as might have been read from an image file.
436+
RGB or RGBA, such as might have been read from an image file.
437437
If *x* is an `~numpy.ndarray` with 3 dimensions,
438438
and the last dimension is either 3 or 4, then it will be
439-
treated as an rgb or rgba array, and no mapping will be done.
439+
treated as an RGB or RGBA array, and no mapping will be done.
440440
The array can be uint8, or it can be floating point with
441441
values in the 0-1 range; otherwise a ValueError will be raised.
442442
If it is a masked array, the mask will be ignored.
@@ -446,9 +446,9 @@ def to_rgba(self, x, alpha=None, bytes=False, norm=True):
446446
replace the preexisting alpha. A ValueError will be raised
447447
if the third dimension is other than 3 or 4.
448448
449-
In either case, if *bytes* is *False* (default), the rgba
449+
In either case, if *bytes* is *False* (default), the RGBA
450450
array will be floats in the 0-1 range; if it is *True*,
451-
the returned rgba array will be uint8 in the 0 to 255 range.
451+
the returned RGBA array will be uint8 in the 0 to 255 range.
452452
453453
If norm is False, no normalization of the input data is
454454
performed, and it is assumed to be in the range (0-1).

lib/matplotlib/contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def clabel(self, levels=None, *,
107107
- If one string color, e.g., *colors* = 'r' or *colors* =
108108
'red', all labels will be plotted in this color.
109109
110-
- If a tuple of colors (string, float, rgb, etc), different labels
110+
- If a tuple of colors (string, float, RGB, etc), different labels
111111
will be plotted in different colors in the order specified.
112112
113113
inline : bool, default: True

lib/matplotlib/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ def set_interpolation_stage(self, s):
781781
Parameters
782782
----------
783783
s : {'data', 'rgba'} or None
784-
Whether to apply up/downsampling interpolation in data or rgba
784+
Whether to apply up/downsampling interpolation in data or RGBA
785785
space.
786786
"""
787787
if s is None:

lib/matplotlib/texmanager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def get_grey(cls, tex, fontsize=None, dpi=None):
346346
@classmethod
347347
def get_rgba(cls, tex, fontsize=None, dpi=None, rgb=(0, 0, 0)):
348348
r"""
349-
Return latex's rendering of the tex string as an rgba array.
349+
Return latex's rendering of the tex string as an RGBA array.
350350
351351
Examples
352352
--------

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2676,12 +2676,12 @@ def voxels(self, *args, facecolors=None, edgecolors=None, shade=True,
26762676
These parameters can be:
26772677
26782678
- A single color value, to color all voxels the same color. This
2679-
can be either a string, or a 1D rgb/rgba array
2679+
can be either a string, or a 1D RGB/RGBA array
26802680
- ``None``, the default, to use a single color for the faces, and
26812681
the style default for the edges.
26822682
- A 3D `~numpy.ndarray` of color names, with each item the color
26832683
for the corresponding voxel. The size must match the voxels.
2684-
- A 4D `~numpy.ndarray` of rgb/rgba data, with the components
2684+
- A 4D `~numpy.ndarray` of RGB/RGBA data, with the components
26852685
along the last axis.
26862686
26872687
shade : bool, default: True

0 commit comments

Comments
 (0)