boxplot没有胡须和出点

时间:2017-02-10 11:03:57

标签: r graphics boxplot

任何人都知道如何消除R箱图中的最大和最小条? 我尝试了上面的命令,但它没有用。

boxplot(rnorm(0:200), main="abundances", xlab="Samples", ylab="Phylum abundance (%)", header=TRUE, cex=1, ylim=c(-5,4.), notch=F)

enter image description here

谢谢

我有这个: 但想要这个: enter image description here

1 个答案:

答案 0 :(得分:1)

您可以将staplewexwhisklty参数添加到基本图中,如下所示:

boxplot(rnorm(0:200), main="abundances", xlab="Samples", ylab="Phylum abundance (%)", header=TRUE, cex=1, ylim=c(-5,4.), notch=F, 
        staplewex = 0,       # remove horizontal whisker lines
        outline = F,         # remove outlying points
        whisklty = 0,        # remove vertical whisker lines
        staplecol = "white", # just to be totally sure :)
        whiskcol = "white"   # dito
        )

enter image description here