【matplotlib】 之 清理、清除 axes 和 figure (plt.cla、plt.clf、plt.close)

____tz_zspython figure 的重複利用能大大節約時間,可是 matplotlib 維護的 figure 有數量上限(RuntimeWarning: More than 20 figures have been opened.)。而且,不斷的建立新的 figure 實例,很容易形成內存泄漏,而應合理的複用,能大大的提升運行速度。此外,在某些狀況下,不清理 figure 將有可能形成
相關文章
相關標籤/搜索