@@ -5406,22 +5406,26 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5406
5406
5407
5407
- (M, N): an image with scalar data. The data is visualized
5408
5408
using a colormap.
5409
- - (M, N, 3): an image with RGB values (float or uint8 ).
5410
- - (M, N, 4): an image with RGBA values (float or uint8), i.e.
5411
- including transparency.
5409
+ - (M, N, 3): an image with RGB values (0-1 float or 0-255 int ).
5410
+ - (M, N, 4): an image with RGBA values (0-1 float or 0-255 int),
5411
+ i.e. including transparency.
5412
5412
5413
5413
The first two dimensions (M, N) define the rows and columns of
5414
5414
the image.
5415
5415
5416
- The RGB(A) values should be in the range [0 .. 1] for floats or
5417
- [0 .. 255] for integers. Out-of-range values will be clipped to
5418
- these bounds.
5416
+ Out-of-range RGB(A) values are clipped.
5419
5417
5420
5418
cmap : str or `~matplotlib.colors.Colormap`, optional
5421
- A Colormap instance or registered colormap name. The colormap
5422
- maps scalar data to colors. It is ignored for RGB(A) data.
5419
+ The Colormap instance or registered colormap name used to map
5420
+ scalar data to colors. This parameter is ignored for RGB(A) data.
5423
5421
Defaults to :rc:`image.cmap`.
5424
5422
5423
+ norm : `~matplotlib.colors.Normalize`, optional
5424
+ The `Normalize` instance used to scale scalar data to the [0, 1]
5425
+ range before mapping to colors using *cmap*. By default, a linear
5426
+ scaling mapping the lowest value to 0 and the highest to 1 is used.
5427
+ This parameter is ignored for RGB(A) data.
5428
+
5425
5429
aspect : {'equal', 'auto'} or float, optional
5426
5430
Controls the aspect ratio of the axes. The aspect is of particular
5427
5431
relevance for images since it may distort the image, i.e. pixel
@@ -5462,23 +5466,16 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5462
5466
which can be set by *filterrad*. Additionally, the antigrain image
5463
5467
resize filter is controlled by the parameter *filternorm*.
5464
5468
5465
- norm : `~matplotlib.colors.Normalize`, optional
5466
- If scalar data are used, the Normalize instance scales the
5467
- data values to the canonical colormap range [0,1] for mapping
5468
- to colors. By default, the data range is mapped to the
5469
- colorbar range using linear scaling. This parameter is ignored for
5470
- RGB(A) data.
5469
+ alpha : scalar, optional
5470
+ The alpha blending value, between 0 (transparent) and 1 (opaque).
5471
+ This parameter is ignored for RGBA input data.
5471
5472
5472
5473
vmin, vmax : scalar, optional
5473
5474
When using scalar data and no explicit *norm*, *vmin* and *vmax*
5474
5475
define the data range that the colormap covers. By default,
5475
5476
the colormap covers the complete value range of the supplied
5476
5477
data. *vmin*, *vmax* are ignored if the *norm* parameter is used.
5477
5478
5478
- alpha : scalar, optional
5479
- The alpha blending value, between 0 (transparent) and 1 (opaque).
5480
- This parameter is ignored for RGBA input data.
5481
-
5482
5479
origin : {'upper', 'lower'}, optional
5483
5480
Place the [0,0] index of the array in the upper left or lower left
5484
5481
corner of the axes. The convention 'upper' is typically used for
0 commit comments