Skip to content
Prev 244204 / 398506 Next

please show me simple example how to plot

Like Peter says, this sounds like loess, there are examples on the help page for scatter.smooth, you could also do this with lattice graphics using type=c('p','smooth'), or ggplot2 graphics (probably something like geom_smooth or geom_loess, I don't know ggplot2 that well yet).

If you want to learn more about how loess works then use loess.demo in the TeachingDemos package.  

There are also other smoothers available, but we would need more information before knowing where to point you.

For adding a general curve or line to a scatterplot also look at functions like "lines", "abline", and "curve", as well as the entire ggplot2 package.