Matplotlib中文设置

1.中文设置方法,代码前加入语句

from pylab import mpl
mpl.rcParams['font.sans-serif'] = ['SimHei']

2.例子

复制代码
# -*- coding: utf-8 -*-
import matplotlib.pyplot as Plot
from pylab import mpl
mpl.rcParams['font.sans-serif'] = ['SimHei']
Plot.figure(u'')
Plot.title(u'')
Plot.scatter(0.5, 0.5)
Plot.text(0.5, 0.5, u'')
Plot.legend((u''))
Plot.xlabel(u'')
Plot.ylabel(u'')
Plot.show()
复制代码

 

360截图20160603154215570

posted @   佩雷尔曼的信徒  阅读(157)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示