#设计matplotlib全局字体
import matplotlib
matplotlib.rc("font",family='SimHei')
#局部设置改变字体
font1 = FontProperties(fname=r"c:\windows\fonts\simsun.ttc")
font2 = FontProperties(fname=r"c:\windows\fonts\STHUPO.TTF")
font3 = FontProperties(fname=r"c:\windows\fonts\STCAIYUN.TTF")
plt.xlabel("横轴/单位",fontproperties=font1)
plt.ylabel("纵轴/单位",fontproperties=font1)
plt.title("标题",fontproperties=font3)