R2-29-CC-第一次作业-ggplot2画散点图/折线图

CISO 2017-11-07 15:48:10 阅读: 1011
  1. 散点图

> library(ggplot2)

> dat1 = read.csv(file.choose(),header = T)

> ggplot(dat1,aes(x=A,y=B,colour=SIZE))+geom_point(size = 2.2,shape = 19,alpha = 0.4)+ggtitle("R1-29 CC")+labs(x="A gene expression", y="B gene expression")+theme(axis.title.x = element_text(size = 15, face = "bold"),axis.title.y = element_text(size = 15, face = "bold"),title = element_text(face = "bold"),legend.title = element_text(face = "bold"),legend.text = element_text(face = "bold"))+xlim(xmin=-2,xmax=3)+ylim(ymin=-1,ymax=3)

Rplot.png


2.散点图

> library(ggplot2)

> dat2 = read.csv(file.choose(),header = T)

> ggplot(dat2,aes(x=Time,y=value,colour=SIZE,shape=SIZE))+geom_line(colour="black",size = 0.7)+geom_point(size = 3)+ggtitle("R1-29 CC")+theme(axis.title.x = element_text(size = 15, face = "bold"),axis.title.y = element_text(size = 15, face = "bold"),title = element_text(face = "bold"),legend.title = element_text(face = "bold"),legend.text = element_text(face = "bold"))

Rplot01.png

 
邀请讨论

附件

{{f.title}} 大小 {{f.file_size}} 下载 {{f.count_download}} 金币 {{f.count_gold}}
{{item.nick_name}} 受邀请回答 {{item.create_time}}
{{item.refer_comment.nick_name}} {{item.refer_comment.create_time}}

附件

{{f.title}} 大小 {{f.file_size}} 下载 {{f.count_download}} 金币 {{f.count_gold}}
切换到完整回复 发送回复
赞({{item.count_zan}}) 踩({{item.count_cai}}) 删除 回复 关闭
科研狗©2015-2024 科研好助手,京ICP备20005780号-1 建议意见

服务热线

178 0020 3020

微信服务号