我正在尝试使用 matplotlib 将数据显示为图像,但收到此错误: AttributeError module 'matplotlib' has no attribute 'imshow'
这是一个示例代码:
import numpy as np
import matplotlib as plt
im = np.arange(10)
im = im[np.newaxis, :]
im = np.repeat(im, 10, axis=0)
plt.imshow(im, cmap='gray')
Run Code Online (Sandbox Code Playgroud)
使用:python:3.7.9 matplotlib:3.3.4