这个错误通常是因为当前字体中没有包含所需的字符造成的。解决方法可以尝试以下两种:

  1. 更换字体:使用包含所需字符的字体,可以通过在设置字体时指定字体文件路径来更换字体。

  2. 忽略警告:如果你确定这个字符不是必须的,可以忽略这个警告,可以使用以下代码忽略警告:

    import warnings
    warnings.filterwarnings('ignore', category=RuntimeWarning, message='Glyph .* missing from current font')
    
解决 Python Matplotlib 报错 'Glyph ... missing from current font'

原文地址: https://www.cveoy.top/t/topic/nleo 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录