명시적으로 figure 닫기를 수행하는 코드를 figure 저장 후에 삽입
plt.cla() # clear the current axes plt.clf() # clear the current figure plt.close('all') # closes the current figure