Advertisement

matplotlib pyplot imshow

阅读量:

官方网址:https://matplotlib.org/devdocs/api/_as_gen/matplotlib.pyplot.imshow.html

复制代码
    matplotlib.pyplot.imshow(X, cmap=None, norm=None, aspect=None, interpolation=None, alpha=None, vmin=None, vmax=None, origin=None, extent=None, *, filternorm=True, filterrad=4.0, resample=None, url=None, data=None, **kwargs)
    
    
      
    

将数据以图像形式呈现,即在二维常规光栅上进行显示。

输入数据可以是实际的RGB(A)格式信息,也可以是需要转换为伪彩色图像的二维标量数据。若需展示灰度图像,可通过设置颜色映射参数Cmap=‘Grey’、Vmin=0、Vmax=255来实现。

用于生成图像的像素数量由图表的轴尺寸及dpi参数共同决定。这可能导致在对图像进行重新采样时出现锯齿状瑕疵,因为所显示的图像尺寸通常与原始数据X的尺寸不一致(详见图像抗锯齿相关内容)。可以通过插值参数以及/或rcParams[“image.interpolation”](%E

全部评论 (0)

还没有任何评论哟~