import matplotlib.pyplot as plt
%matplotlib inline
%config InlineBackend.figure_format = 'svg'
或者
import matplotlib.pyplot as plt
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
plt.savefig('保存图片的名称.png', dpi=500, bbox_inches='tight') # 解决图片不清晰,不完整的问题
plt.show()
AttributeError: ‘AxesSubplot‘ object has no attribute ‘savefig‘
在plt后面加上figure
plot.figure.savefig(...)