问题1:Python数据可视化时,图形无法显示中文
matplotlib无法显示中文
报错信息:UserWarning: Glyph 25240 (\N{CJK UNIFIED IDEOGRAPH-6298}) missing from current font. self.figure. ( 字形Glyph 25240从当前字体中消失)
查询所有字体
from matplotlib.font_manager import FontManager
mpl_fonts = set(fs.name for fs in FontManager().ttflist)
print('all fonts list are:')
for fs in sorted(mpl_fonts):
print('打印所有字体:''