解决matplotlib中文乱码 添加如下代码 plt.rcParams['font.sans-serif'] = ['SimHei']#设置字体 plt.rcParams['axes.unicode_minus'] = False 添加代码前: 添加代码后: