在python文件當前目錄下添加simsun.ttc(資源網上下載即可,有很多)
代碼如下:
plt.title("標題", fontproperties='SimHei', size=20)
plt.xlabel("品位(%)", fontproperties='SimHei', size=15)
plt.ylabel("期望值", fontproperties='SimHei', size=15)
添加之前的效果:
添加之后的效果:
在python文件當前目錄下添加simsun.ttc(資源網上下載即可,有很多)
代碼如下:
plt.title("標題", fontproperties='SimHei', size=20)
plt.xlabel("品位(%)", fontproperties='SimHei', size=15)
plt.ylabel("期望值", fontproperties='SimHei', size=15)
添加之前的效果:
添加之后的效果:
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。