Reputation: 21
My issue is that I'd like to know how to plot smoothed lines in qplot in R, except without the gray bands around them. For instance, when I write this:
qplot(wt, mpg, data=mtcars, geom=c("smooth"), color=factor(cyl), method="lm",
formula = y ~ ns(x,4))
The plot that appears has not only the three colored lines, but these large gray clouds around the lines. How do I remove those while also keeping the smooth lines? Geom="line" gives me very jagged lines that trace every noisy point, so those won't do either.
Any help is appreciated.
Thank you.
Upvotes: 2
Views: 1097
Reputation: 46882
add se=FALSE
.
from page 14 of the ggplot2 book (which is expensive, but worth it).
[bdemarest - thanks for the edit! (didn't capitalize FALSE correctly)]
Upvotes: 3