Learn R Programming

longCatEDA (version 0.13)

colChoose: Internal Function for Selecting Color Schemes Used by longCatPlot

Description

Internal function used by longCatPlot.

Usage

colChoose(colScheme, nfactors, reverse = FALSE)

Arguments

colScheme
can be one of
  • 0 = 1:8 + 'darkgreen' (9==1, so you can't use 1:9)
  • 1 = roygbiv
  • 2 = orange to blue
  • 3 = green to red
  • 'gray' = a spectrum of greys
  • 'oldheat' = a manual heat map spectrum
  • 'coldheat'
nfactors
see nfactors in values returned by longCat.
reverse
logical - should color scheme be applied in reverse order to the levels of the categorical variable? Default is FALSE. See reverse input to longCatPlot.

References

Tueller, S. J., Van Dorn, R. A., and Bobashev, G. V. (2013). Visualization of Categorical Longitudinal and Times Series Data. Manuscript Under Review.

See Also

longCatPlot.

Examples

Run this code
# color examples
par(mfrow=c(3,4), bg='wheat')
times <- c(1,100,200,300,400,500)
f3lc <- longCat( example3, times, Labels=rep('',5) )
longCatPlot(f3lc, main='colScheme=0', colScheme=0, lwd=.1, ylab='', legendBuffer = .25)
longCatPlot(f3lc, main='colScheme=1', colScheme=1, lwd=.1, ylab='', legendBuffer = .25)
longCatPlot(f3lc, main='colScheme=2', colScheme=2, lwd=.1, ylab='', legendBuffer = .25)
longCatPlot(f3lc, main='colScheme=3', colScheme=3, lwd=.1, ylab='', legendBuffer = .25)
longCatPlot(f3lc, main='colScheme=gray', colScheme='gray', lwd=.1, ylab='', legendBuffer = .25)
longCatPlot(f3lc, main='colScheme=oldheat', colScheme='oldheat', lwd=.1, ylab='', legendBuffer = .25)
longCatPlot(f3lc, main='colScheme=coldheat', colScheme='coldheat', lwd=.1, ylab='', legendBuffer = .25)
longCatPlot(f3lc, main='colScheme=rainbow', colScheme='rainbow', lwd=.1, ylab='', legendBuffer = .25)
longCatPlot(f3lc, main='colScheme=heat', colScheme='heat', lwd=.1, ylab='', legendBuffer = .25)
longCatPlot(f3lc, main='colScheme=terrain', colScheme='terrain', lwd=.1, ylab='', legendBuffer = .25)
longCatPlot(f3lc, main='colScheme=topo', colScheme='topo', lwd=.1, ylab='', legendBuffer = .25)
longCatPlot(f3lc, main='colScheme=cm', colScheme='cm', lwd=.1, ylab='', legendBuffer = .25)
par(mfrow=c(1,1), bg='white')

Run the code above in your browser using DataLab