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://blog.csdn.net/tz_zs/article/details/81393098

posted on 2022-09-18 08:40  lmqljt  阅读(367)  评论(0编辑  收藏  举报

导航