Description Usage Arguments Details Value Author(s) See Also Examples
Plot and add a smooth curve computed by loess to a scatter plot.
1 2 3 4 |
x,y |
the x and y arguments provide the x and y coordinates for the plot. Any reasonable way of defining the coordinates is acceptable. See the function xy.coords for details. |
data |
data frame or environment containing the variables. |
span |
smoothness parameter for loess. |
degree |
degree of local polynomial used. |
family |
if "gaussian" fitting is by least-squares, and if family="symmetric" a re-descending M estimator is used. |
xlab, ylab |
labels for the x and y axes |
ylim |
y limits of the plot |
evaluation |
number of points at which to evaluate the smooth curve. |
add |
if TRUE, the loess line will be added to an existing plot. |
CI |
the confidence interval to be plotted, or NULL (the default) to suppress plotting of the confidence interval. |
col.smooth, lwd.smooth, lty.smooth |
colour, line width and line type for the loess smoother line. |
... |
graphical parameters. |
This is identical to stats::scatter.smooth except that: 1. it allows you to specify the colour, width and line type of the loess line; defaults to col="red", lwd=1, lty=1. 2. it suppresses warnings from the loess.smooth function for sparse data sets. 3. with add = TRUE, it allows a loess line to be added to an existing scatterplot.
None
Mike Meredith, 28 Aug 2012, adapted from stats::scatter.smooth.
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.