library(ggalluvial)library(ggfittext)ggplot(orf_type,aes(V1,V3,alluvium=V2,stratum=V2,label=V3))+geom_alluvium(aes(fill=V2),alpha=0.5,width=0.6)+geom_stratum(aes(fill=V2),width=0.6)+geom_bar_text(position="stack",outside=TRUE,contrast=FALSE,place="top")+theme_minimal()+scale_fill_npg(alpha=0.7)+labs(x=NULL,y=NULL,title="Predicted ORF type number comparison")+theme(legend.title=element_blank())
Mean + SD 柱状图
展示均值 ± 标准差,适合生物学重复数据的可视化:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
ggplot(exp.L8,aes(x=V3,y=V4,fill=V2))+stat_summary(geom="col",fun="mean",width=0.5)+geom_point()+stat_summary(fun=mean,geom="errorbar",fun.max=function(x)mean(x)+sd(x),fun.min=function(x)mean(x)-sd(x),width=0.3)+facet_wrap(~V2)+labs(x=NULL,y="Expression/TPM",title="L8 lncRNA Expression in ovule")+theme_bw()+theme(legend.title=element_blank(),strip.background=element_blank(),panel.grid=element_blank())+scale_fill_aaas(alpha=0.6)ggsave("L8_RNA-seq_Exp_in_ovule.pdf",width=5,height=2.5)