您的位置:首页 > 编程语言 > Python开发

数据分析python应用到的ggplot(二)

2017-09-12 02:02 477 查看
还是优达学院的第七课

数据:https://s3.amazonaws.com/content.udacity-data.com/courses/ud359/hr_by_team_year_sf_la.csv

ggplot:

gp = pandas.read_csv(hr_by_team_year_sf_la_csv)
gg =  ggplot(gp,aes('yearID','HR',color = 'teamID')) + geom_point() + geom_line() + ggtitle('Total HRs by Year') + xlab('Year') +ylab('HR')


图形:



easy learnning:

from ggplot import *
ggplot(aes(x='date',y='beef'),data=meat)+geom_line()+stat_smooth(colour='blue', span=0.2)


图形:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: