首页 > 其他 > 详细

matplotlib 显示中文 与 latex冲突

时间:2015-06-24 14:37:39      阅读:252      评论:0      收藏:0      [点我收藏+]

如果在使用中文之前包含了使用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)

matplotlib 显示中文 与 latex冲突

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!