matplotlib 清除axis plt.cla()、plt.clf()、plt.close()

plt.cla() # 清除axes,即当前 figure 中的活动的axes,但其他axes保持不变。
plt.clf() # 清除当前 figure 的所有axes,但是不关闭这个 window,所以能继续复用于其他的 plot。
plt.close() # 关闭 window,如果没有指定,则指当前 window。



https://www.jianshu.com/p/75a62a72e6e9

posted @ 2020-04-05 22:00  小娜子成长记  阅读(5298)  评论(0编辑  收藏  举报