项目场景
使用matplotlib时为图形设置x轴标记,y轴标记,标题默认只能使用英文,当使用中文时会出现以下错误:
UserWarning: Glyph 32654 (\N{CJK UNIFIED IDEOGRAPH-7F8E}) missing from current font.

解决方法
在引入matplotlib后在加入下列两行配置中文显示
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif']=['SimHei'] #设置显示中文标签
plt.rcParams['axes.unicode_minus']=False #设置正常显示符号