matplotlib提示RuntimeWarning: Glyph 20998 missing from current font

使用matplotlib画图报错,情况如下

RuntimeWarning: Glyph 20998 missing from current font

技术分享图片

查询后初步发现是matplotlib找不到字体,需要自行设置一下:

plt.rcParams['font.sans-serif']=['SimHei']
文章来自:https://www.cnblogs.com/zmichael/p/12239421.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3