[R] ggplot2: Adding points to a density plot
johannes_graumann at web.de
Wed Mar 31 13:46:06 CEST 2010
Consider something like
> movies$decade <- round_any(movies$year, 10)
> m <- qplot(rating,data=movies,colour=factor(decade),geom="density")
(modified from "?stat_density").
I'd like to add on the line y=0 a dot for the median of each "decade"
category (using the same colour coding as the "fill"). I'm failing miserably
at all my
> m + geom_point
based approaches and would appreciate if someone could show me the ggplot2
way of achieving this.
More information about the R-help