Python/matplotlib之【RuntimeWarning: More than 20 figures have been opened】

2023-05-16

Python/matplotlib之【RuntimeWarning: More than 20 figures have been opened】

当绘图的过程中,建立了大量的figure,就会报错
解决的方法(两种):

  1. 及时关掉已存在的图像:plt.close("all")
  2. 擦除figure上的图像以便复用:plt.cla()
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Python/matplotlib之【RuntimeWarning: More than 20 figures have been opened】 的相关文章

随机推荐