matplotlib绘图后保存:
plt.figure()
plt.plot(list(range(len(df_data))),df_data['peak_nextday'],color='r',label='peak_nextday')
plt.plot(list(range(len(df_data))),df_data['peak_predicted'],color='r',label='peak_predicted')
plt.legend()
plt.grid()
plt.savefig(image_save_file)
plt.close()#不加这句话的时候多次运行这段代码时图像会重叠,很神奇的bug
待续……