Save plot to image file instead of displaying it using Matplotlib

前端 未结 20 1778
一生所求
一生所求 2020-11-22 06:07

I am writing a quick-and-dirty script to generate plots on the fly. I am using the code below (from Matplotlib documentation) as a starting point:

from pylab         


        
20条回答
  •  无人共我
    2020-11-22 06:44

    If, like me, you use Spyder IDE, you have to disable the interactive mode with :

    plt.ioff()

    (this command is automatically launched with the scientific startup)

    If you want to enable it again, use :

    plt.ion()

提交回复
热议问题