matplotlib 显示中文 与 latex冲突

时间:2015-06-24 14:37:39   收藏:0   阅读:253

如果在使用中文之前包含了使用latex的语法:

mpl.rcParams[‘text.usetex‘] = True

将不能正确显示含有中文的图片。

 

附 显示中文的方法:

from matplotlib.font_manager import FontProperties
font_chinese = FontProperties(fname=r"c:\windows\fonts\simsun.ttc", size=12)

 

 title(u‘比值‘, fontproperties=font_chinese)

原文:http://www.cnblogs.com/liuquansongsheng/p/4597552.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!