用R画箱线图(boxplot)

  • A+
所属分类:Script

前面的一篇文章给大家介绍了箱线图的含义,《 箱线图(boxplot)介绍 》。现在给大家分享用R画画箱线图的代码。

代码如下:

finaldata<-data.frame(ZM,OS,SB,AT,GM,PT,VV,WS,TC,MS,OT,CR,PP)  
####其中ZM,OS,SB,AT,GM,PT,VV,WS,TC,MS,OT,CR,PP分别是从13个文件中读取的数据
boxplot(finaldata,col=c("steelblue","steelblue","steelblue","mediumturquoise","mediumturquoise","mediumturquoise","mediumturquoise","mediumturquoise","mediumturquoise","sandybrown" ,"hotpink","hotpink","hotpink"),ylab="Length of AA",las=1, font.lab=2)

效果图如下(点击放大):

用R画箱线图(boxplot)

ybzhao

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: