guided_pcp {PairViz}R Documentation

Guided parallel coordinate plot.

Description

Draws a parallel coordinate plot, with an accompanying barchart showing an index (eg correlation, scagnostics) levels for each panel. An index legend is optional.

Usage

guided_pcp(data, edgew=NULL, path = NULL, pathw=NULL,zoom=NULL,pcpfn=pv_pcp,
     pcp.col = 1,lwd=0.5, panel.colors=NULL, pc.mar=c(1.5,2,2,2),
     bar.col=1:9,bar.axes=FALSE, bar.mar=NULL, reorder.weights=TRUE,
    layout.heights=NULL, layout.widths=c(10,1),
     main=NULL,legend=FALSE,cex.legend = 1,legend.mar=c(1,4,1,1),...)

Arguments

data A data frame or matrix.
edgew Matrix (or vector) whose rows give index values for each pair of variables.
path an index vector specifying variable order, or a function. If a function, find_path(edgew,path,...) constructs the index vector.
pathw Matrix (or vector) whose rows give index values for each adjacent pair of variables in path. Usually this argument is NULL and pathw is computed from the path and edgew.
zoom If provided, a numeric vector specifying a subsequence of path to display.
pcpfn Function to draw the parallel coordinates.
pcp.col Line colors.
lwd Line widths.
panel.colors Background panel colors, passed to thepcpfn
pc.mar Controls PCP margin size.
bar.col Bar colors.
bar.axes Draw barplot axes, if TRUE.
bar.mar Controls barplot margin size.
reorder.weights If TRUE, reorder barplot indices so large values are drawn at the bottom.
layout.heights Controls the layout.
layout.widths Controls the layout.
main Main title for PCP.
legend If TRUE, draws the barplot index legend.
cex.legend Controls legend text size.
legend.mar Legend margin size.
... Optional arguments

Author(s)

C.B. Hurley and R.W. Oldford

References

see overview

See Also

pv_pcp

Examples

                                
require(PairViz)                        

data <- mtcars[,c(1,3:6)]
cols <- c("red","green")[mtcars[,9]+1 ]    # transmission type, red=automatic

# add a correlation guide and find "better" hamiltonians...

# add a correlation guide...

corw <- dist2edge(as.dist(cor(data)))
edgew <- cbind(corw*(corw>0), corw*(corw<0))
         
# add a correlation guide to a PCP, positive cors shown in blue, negative in purple...

## Not run: 
dev.new(width=3,height=3)

par(cex.axis=.65)

guided_pcp(data,edgew, pcp.col=cols,
         main="Correlation guided PCP",bar.col = c("blue","purple"))

dev.new(width=7,height=3)
par(cex.axis=.65)

guided_pcp(data,edgew, path=eulerian, pcp.col=cols,
         main="Correlation guided Eulerian PCP",bar.col = c("blue","purple"),bar.axes=TRUE)


## End(Not run)

# Scagnostic guides are useful here- see the demos for more examples.

[Package PairViz version 1.0 Index]