|
发表于 2022-9-14 10:15:14
|
查看: 1162 |
回复: 0
- x <- read.csv("homo_length.csv",header = T)
- x <- x[1:24,]
- barplot(height = x$length,names.arg = x$chr)
- pie(x$length/sum(x$length))
- m <- read.table("Species.txt");
- m
- x <- m[,3]
- pie(x);
- # colours()
- # sample(colours(),7)
- # rainbow(7)
- pie(x,col=rainbow(length(x)))
- lbls <- paste(m[,1],m[,2],"\n",m[,3],"%" )
- pie(x,col=rainbow(length(x)),labels = lbls)
- pie(x,col=rainbow(length(x)),labels = lbls,radius = 1)
- pie(x,col=rainbow(length(x)),labels = lbls,radius = 1,cex=0.8)
- #3D饼图
- #install.packages("plotrix")
- library(plotrix)
- pie3D(x,col=rainbow(length(x)),labels = lbls)
- pie3D(x,col=rainbow(length(x)),labels = lbls,cex=0.8)
- pieplot <- pie3D(x,col=rainbow(length(x)),radius = 1,explode = 0.05,labels = lbls)
- # pie3D.labels(pieplot,labels = lbls,labelcex = 0.8,height = 0.1,labelrad = 1.75)
- #扇形图
- fan.plot(x,col=rainbow(length(x)),labels = lbls,cex=0.8,radius = 1)
复制代码
3D饼图
扇形图
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
|