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

Skip to content

Commit e5ec7a5

Browse files
committed
Clarify doc for "norm" kwarg to imshow.
"norm" also applies when X is a 2D-array of integers -- i.e, similarly to the "cmap" kwarg. Make the docs for the two kwargs consistent.
1 parent 2a7f606 commit e5ec7a5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4957,8 +4957,8 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
49574957
normalised.
49584958
49594959
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
4960+
If None, default to rc `image.cmap` value. `cmap` is ignored if `X`
4961+
has RGB(A) information.
49624962
49634963
aspect : ['auto' | 'equal' | scalar], optional, default: None
49644964
If 'auto', changes the image aspect ratio to match that of the
@@ -4983,10 +4983,10 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
49834983
'nearest'.
49844984
49854985
norm : `~matplotlib.colors.Normalize`, optional, default: None
4986-
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.
4986+
A `~matplotlib.colors.Normalize` instance is used to
4987+
scale luminance data to 0, 1. If `None`, use the default
4988+
func:`normalize`. `norm` is only used if `X` has RGB(A)
4989+
information.
49904990
49914991
vmin, vmax : scalar, optional, default: None
49924992
`vmin` and `vmax` are used in conjunction with norm to normalize

0 commit comments

Comments
 (0)