import matplotlib
import matplotlib.pyplot as plt
matplotlib.font_manager.fontManager.addfont("/home/lixg/.fonts/msyh.ttf")
# 查看字体名以及对应的字体文件名
# for font in font_manager.fontManager.ttflist:
# print(font.name, '-', font.fname)
plt.rcParams["font.family"] = "Microsoft Yahei"