import pylab as mplmpl.rcParams['font.sans-serif']=['simHei']mpl.rcParams['axes.unicode_minus']=False设置电脑中的字体