How to use for loop to plot figures saved to different files with matplotlib?

后端 未结 1 681
日久生厌
日久生厌 2020-12-12 06:28

I wanted to plot n independent figures by a for loop, with each figure saved to one file. My code is as following:

import matplotlib.pyplot as plt
import num         


        
相关标签:
1条回答
  • 2020-12-12 07:09

    At the beginning of your loop, add:

    plt.close()
    
    0 讨论(0)
提交回复
热议问题