- import matplotlib.pyplot as plt
- """ 一些画图代码 """
- plt.savefig( "filename.png") # 保存图片 注意 在show()之前 不然show会重新创建新的 图片
- plt.show()
import matplotlib.pyplot as plt """ 一些画图代码 """ plt.savefig("filename.png")plt.show()
转载于:https://www.cnblogs.com/stillstep/p/11148715.html