p <- ggplot(mtcars)
for (i in 1:3){
bootdata <- mtcars[sample(1:dim(mtcars)[1], replace = T), ]
p <- p + stat_smooth(data = bootdata, aes(qsec, wt), se = F, size =
2, alpha = .2)
}
print(p)
or, if you need the ribbon, add this before the geom_line:
geom_ribbon(aes(ymin=..ymin.., ymax=..ymax..), stat='smooth', alpha=0.1)
Xie Chao
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> To post to this group, send email to ggp...@googlegroups.com
> To unsubscribe from this group, send email to
> ggplot2+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/ggplot2