他的回复:
回复:Emma_Liu 发表于 2022-6-22 10:48 matplotlib.pyplot 并不默认支持中文显示,需要预设置一下才能正常显示中文 方法1.在有中文输出的地方,增加一个属性:fontproperties这段代码的确可以使用中文,但是现在在开发环境-notebook模块会出现一下报错findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans. findfont: Generic family 'sans-serif' not found because none of the following families were found: SimHei, Songti SC, STFangsong findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans. findfont: Generic family 'sans-serif' not found because none of the following families were found: SimHei, Songti SC, STFangsong findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans. findfont: Generic family 'sans-serif' not found because none of the following families were found: SimHei, Songti SC, STFangsong所以是不是环境里面没有这个字体。但是在codelab里面的notebook是可以正常使用的