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)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章