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 = 2, masspch = 15, curvecol = 1, splinecol = 3,
projectcol = 4, startcol = 1:3, startpch=NULL,...)
## S3 method for class 'lpc.spline':
plot(x, type, unscale = TRUE, lwd = 1, datcol = "grey60",
datpch = 21, masscol = 2, masspch = 15, curvecol = 1, splinecol = 3,
projectcol = 4, startcol = 1:3, 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.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.splinedata(calspeedflow)
lpc1 <- lpc(calspeedflow[,3:4])
plot(lpc1, type=c("spline","project"), lwd=2)Run the code above in your browser using DataLab