Matplotlib-尽管位于font_manager中,但当前字体缺少Glyph 8722

时间:2019-10-13 07:54:21

标签: python matplotlib

要检查所有可用的matplotlib字体,我按照此处的说明进行操作:

http://jonathansoma.com/lede/data-studio/matplotlib/list-all-fonts-available-in-matplotlib-plus-samples/

“ Phetsarath OT”在结果列表中:

enter image description here

当我尝试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)

反正我可以抑制这个错误吗?

1 个答案:

答案 0 :(得分:0)

尝试一下:

    plt.rc('axes', unicode_minus=False)