program R- in ggplot restrict y to be >0 in LOESS plot
- by Nate
Here's my code:
qplot(data=sites, x, y, main="Site 349")
(p <- qplot(data = sites, x, y, xlab = "", ylab = ""))
(p1 <- p + geom_smooth(method = "loess",span=0.5, size = 1.5))
p1 + theme_bw() + opts(title = "Site 349")
Some of the LOESS lines and confidence intervals go below zero, but I would like to restrict the graphics to 0 and positive numbers (because negative do not make sense). How can I do this?