@@ -4944,21 +4944,22 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
4944
4944
Parameters
4945
4945
-----------
4946
4946
X : array_like, shape (n, m) or (n, m, 3) or (n, m, 4)
4947
- Display the image in `X` to current axes. `X` may be a float
4948
- array, a uint8 array or a PIL image. If `X` is an array, it
4949
- can have the following shapes:
4947
+ Display the image in `X` to current axes. `X` may be an
4948
+ array or a PIL image. If `X` is an array, it
4949
+ can have the following shapes and types :
4950
4950
4951
- - MxN -- luminance (grayscale, float array only )
4952
- - MxNx3 -- RGB (float or uint8 array )
4953
- - MxNx4 -- RGBA (float or uint8 array )
4951
+ - MxN -- values to be mapped ( float or int )
4952
+ - MxNx3 -- RGB (float or uint8)
4953
+ - MxNx4 -- RGBA (float or uint8)
4954
4954
4955
4955
The value for each component of MxNx3 and MxNx4 float arrays
4956
- should be in the range 0.0 to 1.0; MxN float arrays may be
4957
- normalised.
4956
+ should be in the range 0.0 to 1.0. MxN arrays are mapped
4957
+ to colors based on the `norm` (mapping scalar to scalar)
4958
+ and the `cmap` (mapping the normed scalar to a color).
4958
4959
4959
4960
cmap : `~matplotlib.colors.Colormap`, optional, default: None
4960
- If None, default to rc `image.cmap` value. `cmap` is ignored when
4961
- `X` has RGB(A) information
4961
+ If None, default to rc `image.cmap` value. `cmap` is ignored
4962
+ if `X` is 3-D, directly specifying RGB(A) values.
4962
4963
4963
4964
aspect : ['auto' | 'equal' | scalar], optional, default: None
4964
4965
If 'auto', changes the image aspect ratio to match that of the
@@ -4984,9 +4985,11 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
4984
4985
4985
4986
norm : `~matplotlib.colors.Normalize`, optional, default: None
4986
4987
A `~matplotlib.colors.Normalize` instance is used to scale
4987
- luminance data to 0, 1. If `None`, use the default
4988
- func:`normalize`. `norm` is only used if `X` is an array of
4989
- floats.
4988
+ a 2-D float `X` input to the (0, 1) range for input to the
4989
+ `cmap`. If `norm` is None, use the default func:`normalize`.
4990
+ If `norm` is an instance of `~matplotlib.colors.NoNorm`,
4991
+ `X` must be an array of integers that index directly into
4992
+ the lookup table of the `cmap`.
4990
4993
4991
4994
vmin, vmax : scalar, optional, default: None
4992
4995
`vmin` and `vmax` are used in conjunction with norm to normalize
0 commit comments