Learn R Programming

aroma.light (version 3.2.0)

plotXYCurve: Plot the relationship between two variables as a smooth curve

Description

Plot the relationship between two variables as a smooth curve.

Usage

"plotXYCurve"(x, y, col=1L, lwd=2, dlwd=1, dcol=NA, xlim=NULL, ylim=xlim, xlab=NULL, ylab=NULL, curveFit=smooth.spline, ..., add=FALSE) "plotXYCurve"(X, Y, col=seq(length = nrow(X)), lwd=2, dlwd=1, dcol=NA, xlim=NULL, ylim=xlim, xlab=NULL, ylab=NULL, curveFit=smooth.spline, ..., add=FALSE)

Arguments

x, y, X, Y
Two numeric vectors of length N for one curve (K=1), or two numeric NxK matrix:es for K curves.
col
The color of each curve. Either a scalar specifying the same value of all curves, or a vector of K curve-specific values.
lwd
The line width of each curve. Either a scalar specifying the same value of all curves, or a vector of K curve-specific values.
dlwd
The width of each density curve.
dcol
The fill color of the interior of each density curve.
xlim, ylim
The x and y plotting limits.
xlab, ylab
The x and y labels.
curveFit
The function used to fit each curve. The two first arguments of the function must take x and y, and the function must return a list with fitted elements x and y.
...
Additional arguments passed to lines used to draw each curve.
add
If TRUE, the graph is added to the current plot, otherwise a new plot is created.

Value

Returns nothing.

Missing values

Data points (x,y) with non-finite values are excluded.