There is no easy way, basically because I'm of the strong believe that
that is not a boxplot. I agree it's a useful plot in some
circumstances, but I think it's misleading to display it in the same
way as a boxplot.
An alternative would be this:
d1 <- function(x) unname(quantile(x, 0.1))
d9 <- function(x) unname(quantile(x, 0.9))
ggplot(mpg, aes(model, cty)) +
geom_crossbar(stat = "summary", fun.y = median, fun.ymin = d1,
fun.ymax = d9) +
geom_point() +
coord_flip()
Hadley