解决matplotlib绘图中文乱码

# 指定默认字体 下面三条代码用来解决绘图中出现的乱码
matplotlib.rcParams['font.sans-serif'] = ['SimHei']
matplotlib.rcParams['font.family'] = 'sans-serif'
# 解决负号'-'显示为方块的问题
matplotlib.rcParams['axes.unicode_minus'] = False

posted on 2019-04-08 15:09  小明他很忙  阅读(329)  评论(0编辑  收藏  举报

导航