plottraj: plottraj

Description Usage Arguments Author(s) Examples

Description

This function plot trajectory of data in two or three dimensions in the order they appear in the input matrix

Usage

1
2
3
4
plottraj(matrix, factor, label = NULL, sizelabel = 0, col = NULL,
  alpha = NULL, pch = NULL, lty = NULL, cex = NULL, axlab = NULL,
  xlim = range(matrix[, 1]), ylim = range(matrix[, 2]), asp = abs((xlim[1]
  - xlim[2])/(ylim[1] - ylim[2])), reorder = T, title = NULL, add = F)

Arguments

matrix

a matrix kx2 or kx3

factor

character: variable factor that affiliates each row to a trajectory

label

character vector: optional vector of names

sizelabel

numeric: size of the label text

col

numeric: col argument in par()

pch

numeric: pch argument in par()

lty

numeric: lty argument in par()

cex

numeric: cex argument in par()

xlim

numeric vector: xlim argument in par() (default=range(matrix[,1]))

ylim

numeric vector: ylim argument in par() (default=range(matrix[,2]))

asp

numeric: giving the aspect ratio y/x (default=abs((xlim[1]-xlim[2])/(ylim[1]-ylim[2])))

reorder

logical: if TRUE group is reordered according the the order of levels appearance

title

character: optional name for the title (default=NULL)

add

logical: if TRUE the plot is added to existing plot

alpha=NULL

transparency value

Author(s)

Paolo Piras

Examples

1
2
3
4
5
6
7
8
## Not run:  
data(case1)
group<-factor(rep(1:5,each=21))
plottraj(procSym(case1,CSinit=T)$PCscores[,1:2],group,asp=1)######## a classic approach does not recover the cycle
dtcase1<-newdt(case1,group,CR=procSym(case1[,,firstsfac(group)],CSinit=F,reflect=F,scale=F,pcAlign=F)$mshape,locs=case1[,,firstsfac(group)],tolrot=10)
plottraj(procSym(dtcase1,CSinit=T)$PCscores[,1:2],group,asp=1) ####  after the parallel transport it is correctly recovered

## End(Not run)

deformetrics/deformetrics documentation built on May 15, 2019, 3:20 a.m.