matplotlib保存eps出错:'latin-1'codec can't encode characters in position 9-12:ordinal not in range(256)

原因:保存路径含有中文。

matplotlib保存eps的两种方法:
1. 图片右上角保存按钮
这里写图片描述
2. 代码方式

out_fig = plt.gcf()
out_fig.savefig('out.eps', format='eps', dpi=1000)

猜你喜欢

转载自blog.csdn.net/songyunli1111/article/details/81258498