matplotlib 显示中文 与 latex冲突

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

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

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

附 显示中文的方法:

from matplotlib.font_manager import FontProperties
font_chinese = FontProperties(fname=r"c:windowsfontssimsun.ttc", size=12)

 

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

原文地址:https://www.cnblogs.com/liuquansongsheng/p/4597552.html