Is there a straightforward way to remove the whiskers from a box-whisker-plot in
ggplot2
R
library("ggplot2")
p <- ggplot(mtcars, aes(factor(cyl), mpg))
p + geom_boxplot(outlier.size = 0)
We only need to add the argument coef = 0
:
library(ggplot2)
p <- ggplot(mtcars, aes(factor(cyl), mpg))
p + geom_boxplot(outlier.size = 0, coef = 0)