[R] how can i plot dotted regression line shaped with condition using ggplot
autumnlin
jialincau at gmail.com
Fri Oct 19 17:46:17 CEST 2012
I am plotting ggplot smooth line. I would like to add dots to the regression
line, the dots are shaped under different condition.
p <- ggplot(data, aes(x = x, y = y,
shape = assign, linetype = factor(sex)))
p0b <- p+
scale_linetype_manual(breaks=c("0","1"), values=c(1,2)) +
geom_smooth(aes(shape = assign, linetype = female), method = "lm", se =
FALSE, size = 1.2)
the dots on the smooth line should be shaped by assign. how can i do it?
maybe i should add something like
scale_shape_manual(values=c(17, 0, 19))
and whatelse?
Thanks.
--
View this message in context: http://r.789695.n4.nabble.com/how-can-i-plot-dotted-regression-line-shaped-with-condition-using-ggplot-tp4646773.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list