본문 바로가기
연구 노트/R Python

파이썬 이전 그림이 계속 나올 때

by Dr. STEAM 2021. 11. 17.
반응형

해결

 

plt.clf()
plt.cla()
plt.close()

 

또는

 

fig, axes = plt.subplots(nrows=2, ncols=2)

axes[0, 1].clear()

 

 

출처: <https://stackoverflow.com/questions/17106288/matplotlib-pyplot-will-not-forget-previous-plots-how-can-i-flush-refresh>

 

 

python - matplotlib.pyplot will not forget previous plots - how can I flush/refresh? - Stack Overflow

728x90
반응형