【发布时间】:2020-12-29 14:20:58
【问题描述】:
RuntimeWarning:
Glyph23130 从当前字体中丢失。font.set_text(s, 0.0, flags=flags)
你好朋友我收到了这个警告。当我将matplotlib.pyplot 与pandas 一起使用时。
【问题讨论】:
标签: python python-3.x pandas numpy matplotlib
RuntimeWarning:
Glyph23130 从当前字体中丢失。font.set_text(s, 0.0, flags=flags)
你好朋友我收到了这个警告。当我将matplotlib.pyplot 与pandas 一起使用时。
【问题讨论】:
标签: python python-3.x pandas numpy matplotlib
看起来是字体问题。我不知道为什么,但以下几行解决了我的问题,现在可以正确显示汉字了:
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
【讨论】: