RuntimeWarning: More than 20 figures have been opened. plt.cla() plt.close("all") 循环中创建太多plt对象,在每个循环中加入上面两句