windows系統下matplotlib顯示中文字體的方法

1、中文顯示爲一個框 2、添加如下代碼 from matplotlib.font_manager import FontProperties font = FontProperties(fname=r’C:\Windows\Fonts\STSONG.TTF’, size=10) # 此文件路徑爲windows自帶的字體路徑,需要什麼字體都可以此路徑下找 plt.ylabel(‘個數’,fontpr
相關文章
相關標籤/搜索