matplotlib提示RuntimeWarning: Glyph 20998 missing from current font


使用matplotlib畫圖報錯,情況如下

RuntimeWarning: Glyph 20998 missing from current font

查詢后初步發現是matplotlib找不到字體,需要自行設置一下:

plt.rcParams['font.sans-serif']=['SimHei']


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM