@@ -4956,21 +4956,22 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
4956
4956
Parameters
4957
4957
-----------
4958
4958
X : array_like, shape (n, m) or (n, m, 3) or (n, m, 4)
4959
- Display the image in `X` to current axes. `X` may be a float
4960
- array, a uint8 array or a PIL image. If `X` is an array, it
4961
- can have the following shapes:
4959
+ Display the image in `X` to current axes. `X` may be an
4960
+ array or a PIL image. If `X` is an array, it
4961
+ can have the following shapes and types :
4962
4962
4963
- - MxN -- luminance (grayscale, float array only )
4964
- - MxNx3 -- RGB (float or uint8 array )
4965
- - MxNx4 -- RGBA (float or uint8 array )
4963
+ - MxN -- values to be mapped ( float or int )
4964
+ - MxNx3 -- RGB (float or uint8)
4965
+ - MxNx4 -- RGBA (float or uint8)
4966
4966
4967
4967
The value for each component of MxNx3 and MxNx4 float arrays
4968
- should be in the range 0.0 to 1.0; MxN float arrays may be
4969
- normalised.
4968
+ should be in the range 0.0 to 1.0. MxN arrays are mapped
4969
+ to colors based on the `norm` (mapping scalar to scalar)
4970
+ and the `cmap` (mapping the normed scalar to a color).
4970
4971
4971
4972
cmap : `~matplotlib.colors.Colormap`, optional, default: None
4972
- If None, default to rc `image.cmap` value. `cmap` is ignored when
4973
- `X` has RGB(A) information
4973
+ If None, default to rc `image.cmap` value. `cmap` is ignored
4974
+ if `X` is 3-D, directly specifying RGB(A) values.
4974
4975
4975
4976
aspect : ['auto' | 'equal' | scalar], optional, default: None
4976
4977
If 'auto', changes the image aspect ratio to match that of the
@@ -4996,9 +4997,11 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
4996
4997
4997
4998
norm : `~matplotlib.colors.Normalize`, optional, default: None
4998
4999
A `~matplotlib.colors.Normalize` instance is used to scale
4999
- luminance data to 0, 1. If `None`, use the default
5000
- func:`normalize`. `norm` is only used if `X` is an array of
5001
- floats.
5000
+ a 2-D float `X` input to the (0, 1) range for input to the
5001
<
5C1B
/td>+ `cmap`. If `norm` is None, use the default func:`normalize`.
5002
+ If `norm` is an instance of `~matplotlib.colors.NoNorm`,
5003
+ `X` must be an array of integers that index directly into
5004
+ the lookup table of the `cmap`.
5002
5005
5003
5006
vmin, vmax : scalar, optional, default: None
5004
5007
`vmin` and `vmax` are used in conjunction with norm to normalize
0 commit comments