Parallel coordinate plot

Share:

Description

Draw a parallel coordinate plot

Usage

1
2
3
4
5
parallel.ade(vars, vnames=NULL, data=NULL, group=NULL, ylim=NULL,
             xlab=NULL, ylab=NULL, main=NULL,
             alpha=NULL, col=NULL, tcol=NULL, bgcol=NULL, lcol=NULL,
             scale=FALSE, desc=FALSE, means=TRUE,
             legendon="top", wall=0)

Arguments

vars
  • a list of numeric variables

  • a vector of character strings with the names of variables in data.frame

vnames

a vector of character strings with the names of variables

data

data.frame if used character string for vars

group
  • a factor to group the lines

  • a character string with the name of the group variable in the data.frame

ylim

the y limits (y1, y2) of the plot

xlab

a title for the x axis

ylab

a title for the y axis

main

an overall title for the plot

alpha

a parameter in [0, 1] for semi-transparency of points

col

a vector of colors for the lines for each group or each line if not using groups

tcol

color of the text in whole plot

bgcol

the background color for plot dekoration

lcol

color for the mean lines

scale

a logical specifying whether the variables will be scaled to the range of [0,1]

desc

a logical specifying whether the colors will be sorted decreasingly

means

logical asking whether to draw means

legendon

a single keyword from:

  • "bottomright"

  • "bottom"

  • "bottomleft"

  • "left"

  • "topleft"

  • "top"

  • "topright"

  • "right"

  • "center"

This places the legend on the inside of the plot frame at the given location.

wall

a number between 0 and 6 for selection the dekoration style of the plot.

See Also

parallel.set.ade

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
x1<-rnorm(1000, 0, 5)
x2<-rnorm(1000, 0, 4)
x3<-rnorm(1000, 0, 3)
x4<-rnorm(1000, 0, 2)
parallel.ade(vars=list(x1, x2, x3, x4))
g<-rbinom(1000, 1, 0.5)
x1[g==1]<- x1[g==1]+8
x2[g==1]<- x2[g==1]-8
x3[g==1]<- x3[g==1]+6
x4[g==1]<- x4[g==1]-6
parallel.ade(vars=list(x1, x2, x3, x4), group=g,wall=3)