绘图时出现以下警告:
60: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory.
解决方法:
在循环里面加入以下代码:
plt.close()