parcoord {MASS}R Documentation

Parallel Coordinates Plot

Description

Parallel coordinates plot

Usage

parcoord(x, col = 1, lty = 1, ...)

Arguments

x a matrix or data frame who columns represent variables.
col A vector of colours, recycled as necessary for each observation.
lty A vector of line types, recycled as necessary for each observation.
... Further graphics parameters which are passed to matplot.

Value

None.

Side Effects

a parallel coordinates plots is drawn.

References

Wegman, E. J. (1990) Hyperdimensional data analysis using parallel coordinates. Journal of the American Statistical Association, 85, 664–675.

Examples

# The function is currently defined as
function(x, col = 1, lty = 1, ...)
{
    x <- apply(x, 2, function(x) (x - min(x))/(max(x) - min(x)))
    matplot(1:ncol(x), t(x), type = "l", col = col, lty = lty,
        xlab = "", ylab = "", axes = FALSE, ...)
    axis(1, at = 1:ncol(x), labels = dimnames(x)[[2]])
    for(i in 1:ncol(x))
        lines(c(i, i), c(0, 1), col = "grey70")
    invisible()
}

[Package Contents]