How to modify whiskers of a boxplot in ggplot2?
How about plotting two boxplots on top of each other. One with red lines and a second one on top without any wiskers at all.
p + geom_boxplot(color="red") + geom_boxplot(aes(ymin=..lower.., ymax=..upper..))
Another option is to plot error bars and on top of them the boxplots without the whiskers:
library(ggplot)
p + stat_boxplot(
geom = "errorbar",
colour = "red",
width = 0,
position = position_dodge(0.75)
) +
geom_boxplot(coef = 0, outlier.shape = NA)