10000 Clarify array shape vs image size in imshow() docstring · mspacek/matplotlib@515a7e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 515a7e5

Browse files
authored
Clarify array shape vs image size in imshow() docstring
1 parent 0984694 commit 515a7e5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5027,7 +5027,7 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
50275027
50285028
Parameters
50295029
----------
5030-
X : array_like, shape (n, m) or (n, m, 3) or (n, m, 4)
5030+
X : array_like, shape (M, N) or (M, N, 3) or (M, N, 4)
50315031
Display the image in `X` to current axes. `X` may be an
50325032
array or a PIL image. If `X` is an array, it
50335033
can have the following shapes and types:
@@ -5040,10 +5040,10 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
50405040
scalar to scalar) and the `cmap` (mapping the normed scalar to
50415041
a color).
50425042
5043-
Elements of RGB and RGBA arrays represent pixels of an MxN image.
5044-
All values should be in the range [0 .. 1] for floats or
5045-
[0 .. 255] for integers. Out-of-range values will be clipped to
5046-
these bounds.
5043+
Elements of RGB and RGBA arrays represent pixels of an NxM
5044+
(width x height) image. All values should be in the range
5045+
[0 .. 1] for floats or [0 .. 255] for integers. Out-of-range
5046+
values will be clipped to these bounds.
50475047
50485048
cmap : `~matplotlib.colors.Colormap`, optional, default: None
50495049
If None, default to rc `image.cmap` value. `cmap` is ignored

0 commit comments

Comments
 (0)
0