import matplotlib.pyplot as plt
import PIL.Image as Image
image = Image.open("0.png").convert("L")
plt.imshow(image,cmap = "rainbow")
plt.show() # 一定要有这个函数才能展示哦
Matplotlib之cmap趣味调色
最新推荐文章于 2024-07-05 03:53:07 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
import matplotlib.pyplot as plt
import PIL.Image as Image
image = Image.open("0.png").convert("L")
plt.imshow(image,cmap = "rainbow")
plt.show() # 一定要有这个函数才能展示哦