Using the range of your data ...
slope <- 10 / as.numeric(as.Date("2010/08/15") - as.Date("1989/10/15"))
intercept <- - slope * as.numeric(as.Date("1989/10/15"))
ggplot(data,aes(x=x,y=y)) +
geom_abline(aes(intercept = intercept, slope = slope)) +
geom_point()
Hope this helps,
fernando
-----Mensaje original-----
De: ggp...@googlegroups.com [mailto:ggp...@googlegroups.com] En nombre de
Joran
Enviado el: jueves, 02 de septiembre de 2010 19:19
Para: ggplot2
Asunto: Specifiying slope,intercept geom_abline using dates
Ideas?
--
You received this message because you are subscribed to the ggplot2 mailing
list.
Please provide a reproducible example: http://gist.github.com/270442
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
--