cparcoord {gclus} | R Documentation |
This function draws a parallel coordinate plot of data. Variables
may be reordered and panels colored in the display. It is a modified
version of parcoord {MASS}
.
cparcoord(data, order = NULL, panel.colors = NULL, col = 1, lty = 1, horizontal = FALSE, mar = NULL, ...)
data |
a numeric matrix |
order |
the order of variables. Default is the order in data. |
panel.colors |
either a vector or a matrix of panel colors. If a vector is supplied, the ith color is used for the ith panel. If a matrix, dimensions should match those of the variables. Diagonal entries are ignored. |
col |
a vector of colours, recycled as necessary for each observation. |
lty |
a vector of line types, recycled as necessary for each observation. |
horizontal |
If TRUE, orientation is horizontal. |
mar |
margin parameters, passed to |
... |
graphics parameters which are passed to matplot. |
If panel.colors
is a matrix and order
is supplied, panel.colors
is
reordered.
Catherine B. Hurley
Hurley, Catherine B. “Clustering Visualisations of Multidimensional Data”, Journal of Computational and Graphical Statistics, vol. 13, (4), pp 788-806, 2004.
cpairs
, parcoord
,
dmat.color
, colpairs
, order.endlink
.
data(state) state.m <- colpairs(state.x77, function(x,y) cor.test(x,y,"two.sided","kendall")$estimate, diag=1) # OR, Works only in R1.8, state.m <-cor(state.x77,method="kendall") state.col <- dmat.color(state.m) cparcoord(state.x77, panel.color= state.col) # Get rid of the panels with lots of line crossings (yellow) by reordering: cparcoord(state.x77, order.endlink(state.m), state.col) # To get rid of the panels with lots of long line segments: # use a different panel merit measure- pclen: mins <- apply(state.x77,2,min) ranges <- apply(state.x77,2,max) - mins state.m <- -colpairs(scale(state.x77,mins,ranges), pclen) cparcoord(state.x77, order.endlink(state.m), dmat.color(state.m))