寄安 发表于 2021-10-24 11:23:55

导入包错误

import numpy as np
from matplotlib.pyplot import Image as plt

x = np.arange(0, 4 * np.pi, 0.1)
y = np.sin(x)
plt.plot(x, y)
plt.xlabel('x')
plt.ylabel('y')
plt.grid()
plt.show()

AttributeError: module 'PIL.Image' has no attribute 'Image'

suchocolate 发表于 2021-10-24 11:26:39

from matplotlib import pyplot as plt
页: [1]
查看完整版本: 导入包错误