【问题标题】:Matplotlib - Glyph 8722 missing from current font despite being in font_managerMatplotlib - 尽管在 font_manager 中,但当前字体中缺少字形 8722
【发布时间】:2019-10-13 07:54:21
【问题描述】:

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

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

“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)

无论如何我可以抑制这个错误吗?

【问题讨论】:

    标签: python matplotlib


    【解决方案1】:

    试试这个:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-04-15
      • 2010-09-24
      • 1970-01-01
      • 1970-01-01
      • 2013-12-01
      • 2018-11-11
      • 1970-01-01
      相关资源
      最近更新 更多