1 参考 https://zhuanlan.zhihu.com/p/24952180 2 轴线中文乱码和正负号错误 import matplotlib.pyplot as plt plt.rcParams['font.sans-serif'] = ['SimHei'] #用来正常显示中文标签 plt.rcParams['axes.unicode_minus'] = False #用来正常显示负号 3 基础画图 x = [1, 2, 3, 4, 5]# Make an array of x values y = [1, 4, 9, 16, 25]# Make an array of y values for each x value pl.plot(x, y)# use pylab to plot x and y pl.show()# show the plot on the screen 4 设置轴线名称 plt.xlabel(u'方差 *10^(-3)', fontproperties='SimHei') plt.ylabel(u'概率/%', fontproperties='SimHei') # 如果没有使用上述中文乱码解决方案,也可以用这个 5 设置多条曲线 plt.plot(x1, y1, 'x++', label="合成语音") plt.plot(x2, y2, 'r--', label="自然语音") plt.legend(loc='upper right')