AttributeError: 'AxesSubplot' object has no attribute 'savefig'错误解决方法
子图没有'savefig'这个方法
可以利用 matplotlib.pyplot 中的 gcf() 方法(get current figure)获得当前的figure:
fig = plt.gcf() fig.savefig('output.png')
子图没有'savefig'这个方法
可以利用 matplotlib.pyplot 中的 gcf() 方法(get current figure)获得当前的figure:
fig = plt.gcf() fig.savefig('output.png')
