python使用matplotlib画图出现中文乱码
2018-01-05 21:00
666 查看
在windows下使用matplotlib画图时会出现中文乱码现象,为了永久解决之一现象,有以下几个步骤:
1、修改matplotlibrc
进入Python安装目录下的Lib\site-packages\matplotlib\mpl-data目录,打开matplotlibrc文件,删除font.family和font.sans-serif两行前的#,并在font.sans-serif后添加微软雅黑字体(Microsoft YaHei)
2、在C:\Windows\Fonts下将微软雅黑复制到Lib\site-packages\matplotlib\mpl-data\fonts下
3、代码中别忘了unicode编码
1、修改matplotlibrc
进入Python安装目录下的Lib\site-packages\matplotlib\mpl-data目录,打开matplotlibrc文件,删除font.family和font.sans-serif两行前的#,并在font.sans-serif后添加微软雅黑字体(Microsoft YaHei)
2、在C:\Windows\Fonts下将微软雅黑复制到Lib\site-packages\matplotlib\mpl-data\fonts下
3、代码中别忘了unicode编码
相关文章推荐
- python3 使用matplotlib画图出现中文乱码的情况
- python3 使用matplotlib画图出现中文乱码的情况
- Python 3下使用Matplotlib工具画图,中文显示乱码的问题解决(修改配置文件)
- Python 3下Matplotlib画图中文显示乱码的解决方法
- Python画图matplotlib展示图中中文乱码
- python画图包seaborn和matplotlib中文字体显示(针对windows系统,,使用ipython notebook)
- python matplotlib.plot画图显示中文乱码的问题
- Python 3下Matplotlib画图中文显示乱码的解决方法
- python3使用matplotlib画图支持中文
- 基于Linux系统中python matplotlib画图的中文显示问题的解决方法
- python matplotlib中文显示乱码解决
- python绘图工具包 matplotlib 中文乱码问题
- python3使用matplotlib画图支持中文
- python的matplotlib画图时无法显示中文的解决方法
- 解决Linux系统中python matplotlib画图的中文显示问题
- Linux环境下修改python matplotlib显示中文乱码方格
- python matplotlib绘图使用中文字体
- python matplotlib中文乱码问题
- ubuntu下matplotlib画图中文乱码问题
- matplotlib中画图显示中文,但保存为图片后中文乱码