lpc
or lpc.spline
and plots any subset of the following components of the local principal curve: Centers of mass; the curve connecting the local centers of mass; the cubic spline representation of the curve; the projections onto the curve; the starting points.## S3 method for class 'lpc':
plot(x, type, unscale = TRUE, lwd = 1, datcol = "grey60",
datpch = 21, masscol = NULL, masspch = 15, curvecol = 1, splinecol = 3,
projectcol = 4, startcol = NULL, startpch=NULL,...)
## S3 method for class 'lpc.spline':
plot(x, type, unscale = TRUE, lwd = 1, datcol = "grey60",
datpch = 21, masscol = NULL, masspch = 15, curvecol = 1, splinecol = 3,
projectcol = 4, startcol = NULL, startpch=NULL,...)
lpc
or lpc.spline
.c("mass", "spline",...)
with possible entries mass, curve, spline, project, start.
scaled=TRUE
in the fitted object).plot
or scatterplot3d
.The most flexible plotting option is masscol
. Depending on the
length of the specified vector, this will be interpreted differently. If
a scalar is provided, the corresponding color will be given to all centers of
mass. If the length of the vector is larger than 1, then this option
will assign different colours to different depths, or different branch
numbers, or to individual data points, depending on the length. The
default setting is assigning colours according to depth, in the order
red, blue, black.
With increasing dimension $d$, less plotting options tend to be supported. The nicest plots are obtained for $d=2$ and $d=3$.
Einbeck, J., Evers, L. & Hinchliff, K. (2010): Data compression and regression based on local principal curves. In A. Fink, B. Lausen, W. Seidel, and A. Ultsch (Eds), Advances in Data Analysis, Data Handling, and Business Intelligence, Heidelberg, pp. 701--712, Springer.
lpc
, lpc.spline
data(calspeedflow)
lpc1 <- lpc(calspeedflow[,3:4])
plot(lpc1, type=c("spline","project"), lwd=2)
Run the code above in your browser using DataLab