Skip to content
Prev 313775 / 398506 Next

ggplot geom_smooth colour

Hello,

Inline.
Em 17-12-2012 15:44, soon yi escreveu:
Yes it does. But add to geom_smooth,  _outside_ the aesthetic.

p1 <- ggplot(df, aes(x=x, y=y, group=treat)) +
     theme_bw() +
     geom_smooth(aes(linetype=treat), colour="black", method="lm", 
se=FALSE, fullrange=T, size=1) +
     geom_point(aes(shape=treat), size=3) +
     scale_shape_manual(values=c(1, 16))

p1


Looks black to me.

Hope this helps,

Rui Barradas