plot3d.prcurve: Interactive 3D plot of a principal curve in principal...

Description Usage Arguments Value Author(s) See Also Examples

Description

Draws a 3D plot of the principal curve in principal coordinate space using the rgl package and functions from vegan3d.

Usage

1
2
3
4
## S3 method for class 'prcurve'
plot3d(x, choices = 1:3, display = "sites", scaling = 0,
        lcol = "darkorange", lwd = 2, decorate = TRUE, xlab = NULL,
        ylab = NULL, zlab = NULL, main = NULL, ...)

Arguments

x

an object of class "prcurve" resulting from a call to prcurve.

choices

numeric vector of length 3; the ordination axes to plot.

display

character; which scores to display. See scores.rda.

scaling

numeric; the scaling to use for the scores. Default is no scaling.

lcol, lwd

The colour and width, respectively, for the principal curve.

decorate

logical; should the plot be decorated with bounding box, axes and labels?

xlab, ylab, zlab, main

Labels for the plot.

...

Arguments passed to other functions. In particular, argments are passed to ordirgl, lines3d, and decorate3d.

Value

A plot is drawn on the active RGL device. If there is no active RGL device, one is opened upon plotting.

Author(s)

Gavin L. Simpson

See Also

ordirgl, prcurve.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Only works if the analogue package is available
if (require("analogue")) {
    ## Load the Abernethy Forest late glacial pollen sequence
    data(abernethy)

    ## Remove the Depth and Age variables
    abernethy2 <- abernethy[, -(37:38)]

    ## Fit the principal curve using the median complexity over
    ## all species
    aber.pc <- prcurve(abernethy2, method = "ca", trace = TRUE,
                       vary = FALSE, penalty = 1.4)

    ## 3D plot of data with curve superimposed
    ## plot3d.prcurve(aber.pc) # now deprecated, instead use
    plot3d(aber.pc)
}

analogueExtra documentation built on May 1, 2019, 8:47 p.m.