R科研作图学习小组

http://group.keyangou.com/RGraph
组长: 管理员:
  • 访问次数:14216
  • 小组等级:8
  • 话题:550
  • 回答:31
  • 签到:340
  • 小组排名:
  • R2-37综合应用案例作业提交

    洪学志 发布于:2018.01.09

    library(ggplot2)

    mydata <-read.csv("/Users/Hong/Desktop/data/data11/task1.csv")

    ggplot(mydata,aes(x=mean,y=statu,colour=group))+geom_errorbar(aes(ymin=statu-sd,ymax=statu+sd),width=0.1)+geom_line()+geom_point()+ggtitle("R2-37")

    11-1.png

    options(scipen=999)

    library(ggplot2)

    theme_set(theme_bw())

    ggplot(midwest,aes(x=area,y=poptotal))+geom_point(aes(col=state,size=popdensity))+geom_smooth(method="loess")+xlim(c(0,0.1))+ylim(c(0,500000))+labs(subtitle="Area VS population",x="Area",y="population",title="R2-37",caption="Source:midwest")

    11-2.png

    library(RColorBrewer)

    library(ggplot2)

    mydata <-read.csv("/Users/Hong/Desktop/data/data11/task3.csv")

    mymatrix=data.matrix(mydata[,c(-1)])

    row.names(mymatrix)=mydata[,1]

    heatmap(mymatrix,Rowv=NA,Colv=NA,scale="column",main="R2-37")

    11-3-2.png


     
    0条评论 21浏览 邀请回答
    沙发空缺中~

    小组告示

    科研狗 2012-2016 京ICP备16006621 科研好助手,专业的科研社交共享平台