我腌了matplotlib图
with open(save_to, 'wb') as file:
pickle.dump(fig, file)
并尝试将其解开
with open(save_to,'rb') as fid:
ax = pickle.load(fid)
plt.show()
或
with open(save_to,'rb') as fid:
ax = pickle.load(fid)
ax.show()
但是我得到了错误
AttributeError: 'Figure' object has no attribute 'stale_callback'
原因是什么?
代码取自https://scikit-learn.org/stable/auto_examples/model_selection/plot_roc.html
我在这里而不是plt.show()腌制。
谢谢!