f=function(x,alpha,beta){alpha*exp(beta*x)}
x=warming$T5cm
plot(warming$umoles60~x,data=warming)
curve(f(x,alpha= 2.7223,beta=0.21834),add=TRUE,col="red")
In ggplot2 I am trying to use the following code:
ggplot() +
geom_point(data=warming, aes(x=SoilTavg, y=umoles60),color="red",shape=1) +
geom_point(data=control, aes(x=SoilTavg, y=umoles60),color="blue",shape=1) +
geom_line(aes(x = x, y =1.3203*exp(0.21978*x)), colour = "blue", fullrange=T, ) +
geom_line(aes(x = x, y =2.7071*exp(0.2001*x)), colour = "red", fullrange=T)
unfortunately this code only makes the lines from -3 to 0 instead of -10 to 0 as I would like. I cannot figure out a way to extend the lines. I have tried these sites
http://perfdynamics.blogspot.com/2010/09/confidence-bands-for-universal.html
http://kohske.wordpress.com/2010/12/25/draw-function-without-data-in-ggplot2/
but I am a little too new at R to get them to work.
The whole reason I need to do this in ggplot2 is because when I export my R figure as a pdf or jpeg, etc, the colors are washed out. When I export ggplot files, this does not happen. Any idea why?
Thank you in advance,
Elizabeth
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2