要检查所有可用的matplotlib字体,我按照此处的说明进行操作:
“ Phetsarath OT”在结果列表中:
当我尝试plt.rcParams["font.family"] = "Phetsarath OT"
时,生成的绘图包含正确的Phetsarath OT字体,但是会触发错误消息:
/matplotlib/backends/backend_agg.py:211: RuntimeWarning: Glyph 8722 missing from current font.
font.set_text(s, 0.0, flags=flags)
/matplotlib/backends/backend_agg.py:180: RuntimeWarning: Glyph 8722 missing from current font.
font.set_text(s, 0, flags=flags)
反正我可以抑制这个错误吗?
答案 0 :(得分:0)
尝试一下:
plt.rc('axes', unicode_minus=False)