zl程序教程

您现在的位置是:首页 >  其它

当前栏目

UserWarning: Glyph 28857 (\N{CJK UNIFIED IDEOGRAPH-70B9}) missing from current font. FigureCanvasA

from missing Current font
2023-09-27 14:25:39 时间

问题记录与解决

在PyCharm中使用matplotlib绘图时,图形中的中文无法正常显示:

遇到如下问题:

在这里插入图片描述

解决

在代码最上方引入以下代码即可:

import matplotlib
matplotlib.rc("font", family='Microsoft YaHei')

已成功解决 ~