美文网首页
matplotlb中文乱码

matplotlb中文乱码

作者: 凉风起天末_ | 来源:发表于2019-02-13 12:55 被阅读0次

使用matplotlib可能会出现中文无法识别的问题,解决方式

#coding:utf-8
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签
plt.rcParams['axes.unicode_minus']=False #用来正常显示负号
#有中文出现的情况,需要u'内容'

相关文章

网友评论

      本文标题:matplotlb中文乱码

      本文链接:https://www.haomeiwen.com/subject/oporeqtx.html