【问题标题】:Glyph 23130 missing from current font当前字体中缺少字形 23130
【发布时间】:2020-12-29 14:20:58
【问题描述】:

RuntimeWarning:Glyph 23130 从当前字体中丢失。 font.set_text(s, 0.0, flags=flags)

你好朋友我收到了这个警告。当我将matplotlib.pyplotpandas 一起使用时。

【问题讨论】:

    标签: python python-3.x pandas numpy matplotlib


    【解决方案1】:

    看起来是字体问题。我不知道为什么,但以下几行解决了我的问题,现在可以正确显示汉字了:

    import matplotlib as plt
    
    plt.rcParams['font.sans-serif']=['SimHei'] #Show Chinese label
    plt.rcParams['axes.unicode_minus']=False   #These two lines need to be set manually
    

    【讨论】:

    • 在哪里寻找支持的字体?我在找卡纳达语字体。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-12-11
    • 2017-01-11
    • 2013-04-12
    • 2019-04-15
    • 2010-09-24
    • 2017-05-07
    • 1970-01-01
    相关资源
    最近更新 更多