python 保存figure图片

1. 在 plt.show() 之前调用 plt.savefig()

  import matplotlib.pyplot as plt

  """ 一些画图代码 """

  plt.savefig("filename.png")

  plt.show()

猜你喜欢

转载自blog.csdn.net/xijuezhu8128/article/details/79931760