[R] Visualize quartiles of plot line

hadley wickham h.wickham at gmail.com
Sun Jun 17 10:47:35 CEST 2007


On 6/17/07, Arne Brutschy <abr-r-project at xylon.de> wrote:
> Hi,
>
> concerning the missing se coloring: I followed the examples on
> http://had.co.nz/ggplot2/stat_smooth.html
>
>  c <- ggplot(mtcars, aes(y=wt, x=qsec))
>
>  c + stat_smooth()
>  c + stat_smooth() + geom_point()
>  c + stat_smooth(se = TRUE) + geom_point()
>  c + stat_smooth(fill=alpha("blue", 0.2), colour="darkblue", size=2)
>  c + geom_point() + stat_smooth(fill=alpha("blue", 0.2), colour="darkblue", size=2)
> Does not work, se is missing.

That's not a ggplot bug - it's a limitation of the graphics device you
are using (windows I guess), which does not support transparent
colours.

>  c + stat_smooth(fill="blue", colour="darkblue", size=2)
> Does work.
>
>  c + stat_smooth(method = lm, formula= y ~ ns(x,3)) + geom_point()
>  c + stat_smooth(method = rlm, formula= y ~ ns(x,3)) + geom_point()
> Does not work:
> "Error in model.frame(formula = formula, data = data, weights = weight,  :
>                  ..2 used in a wrong context, no ... to read"

Oops, sorry, yes, that's a bug in the current version.  I'll be
releasing a new version that fixes that bug very soon (ie. today or
tomorrow)

Hadley



More information about the R-help mailing list