【python】matplotlib中文乱码问题

http://www.pythoner.com/200.html

改matplotlibrc文件
进入Python安装目录下的Lib\site-packages\matplotlib\mpl-data目录,打开matplotlibrc文件,删除font.family和font.sans-serif两行前的#,并在font.sans-serif后添加微软雅黑字体(Microsoft YaHei),代码如下:

matplotlibrc文件修改Python

font.family : sans-serif
font.sans-serif : Microsoft YaHei, Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif

 

posted on 2015-02-12 21:00  colipso  阅读(303)  评论(0编辑  收藏  举报

导航