Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1c6ee08

Browse files
authored
Merge pull request#15527 from timhoffm/doc-imshow-grayscale
Clarify imshow() docs concerning scaling and grayscale images
2 parentsfadc7fc +621eb55 commit1c6ee08

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎lib/matplotlib/axes/_axes.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5484,15 +5484,21 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
54845484
origin=None,extent=None,shape=None,filternorm=1,
54855485
filterrad=4.0,imlim=None,resample=None,url=None,**kwargs):
54865486
"""
5487-
Display an image, i.e. data on a 2D regular raster.
5487+
Display data as an image; i.e. on a 2D regular raster.
5488+
5489+
The input may either be actual RGB(A) data, or 2D scalar data, which
5490+
will be rendered as a pseudocolor image. Note: For actually displaying
5491+
a grayscale image set up the color mapping using the parameters
5492+
``cmap='gray', vmin=0, vmax=255``.
54885493
54895494
Parameters
54905495
----------
54915496
X : array-like or PIL image
54925497
The image data. Supported array shapes are:
54935498
5494-
- (M, N): an image with scalar data. The data is visualized
5495-
using a colormap.
5499+
- (M, N): an image with scalar data. The values are mapped to
5500+
colors using normalization and a colormap. See parameters *norm*,
5501+
*cmap*, *vmin*, *vmax*.
54965502
- (M, N, 3): an image with RGB values (0-1 float or 0-255 int).
54975503
- (M, N, 4): an image with RGBA values (0-1 float or 0-255 int),
54985504
i.e. including transparency.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp