#數(shù)據(jù)格式


代碼
#繪制比列條形圖
```
a=read.table('clipboard',head=T,sep ='\t')
install.packages('ggthemes', dependencies = TRUE)
library(ggplot2)
library(ggthemes)
## 調(diào)整因子水平
a$type <- factor(a$type,levels=c("INV","DUP","INS","DEL"))
ggplot(data=a,aes(accession,number,fill=type))+
? geom_bar(stat="identity",position="stack")+theme_bw()+
? scale_fill_wsj("rgby", "")+
? theme(axis.ticks.length=unit(0.5,'cm'))+
? guides(fill=guide_legend(title=NULL))
```