【发布时间】:2021-04-19 03:59:02
【问题描述】:
我最近尝试使用pyplot.savefig() 命令将图像保存在 Spyder 中,如下所示(从 matplotlib 导入),但它不起作用:
例如代码:
filename = 'myImage.png'
#images contain the image shown in the Spyder Plots pane
pyplot.imshow(images)
pyplot.savefig(filename)
我知道绘图窗格有一个保存按钮,但我想以编程方式(使用 Python)保存图像。
请指教。
谢谢!
【问题讨论】:
标签: python image matplotlib spyder