Is there a straightforward way to remove the whiskers from a box-whisker-plot in ggplot2 in R? I\'d like to keep only the boxes themselves.
ggplot2
R
We only need to add the argument coef = 0:
coef = 0
library(ggplot2) p <- ggplot(mtcars, aes(factor(cyl), mpg)) p + geom_boxplot(outlier.shape = NA, coef = 0) # Or outlier.size = -1 instead of outlier.shape = NA