splus.theme: S-Plus Graphics Color Themes

Description Usage Arguments Details Value Author(s) See Also Examples

Description

splus.colors and splus.theme are used in lattice plots to replicate the default color scheme used in S-Plus trellis graphics.

Usage

1
2
  splus.colors(i=NULL)
  splus.theme(name = .Device, color = (name != "postscript") )

Arguments

i

Integer index into color table (defined below). Currently valid values are 1 to 17 inclusive. Default value, NULL, returns the entire data frame.

name

The device to use for plotting, e.g., windows. Defaults to the active graphics device (.Device).

color

Use colors or grayscale? Defaults to TRUE for all devices except the postscript device.

Details

splus.colors defines the following colors:

RGB Value Index Color Name
( 0, 0, 0) 1 black
(255, 0, 0) 2 red
( 0, 64,128) 3 navy
( 0,255, 0) 4 green
(255,127, 0) 5 orange
( 0,126,255) 6 sky blue
(255,255, 0) 7 yellow
(255, 0, 0) 8 red
(198,255,255) 9 pastel seagreen
(255,195,255) 10 pastel lavender
(200,255,200) 11 pastel light green
(255,209,143) 12 pastel light orange
(169,226,255) 13 pastel light blue
(255,255,195) 14 pastel light yellow
(255,140,138) 15 pastel dark pink
(110,110,100) 16 dark grey
(128,128,128) 17 darker grey

splus.theme sets up a theme for use with lattice graphics.

Value

splus.colors returns a data frame of RGB color values.

splus.theme returns a list compatible with a lattice theme.

Author(s)

Christopher G. Green christopher.g.green@gmail.com

See Also

trellis.device

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
    # normal distribution example
    n.cases  <- 2
    n.trials <- 4
    n.sample <- 250
    # generate sample data
    normal.sample.data <- as.data.frame(
        list(
            ret=rnorm(n.trials*n.cases*n.sample, 
                mean=rep(seq(-5,5,length=n.trials*n.cases),each=n.sample), 
                sd=rep(seq(0.1,10,length=n.trials*n.cases),each=n.sample)),
            trial=rep(paste("TRIAL 0",1:n.trials,sep=""),each=n.cases*n.sample),
            case=rep(paste("CASE ",LETTERS[1:n.cases],sep=""),
                n.trials*n.sample)
        )
    )
	xxx <- bwplot( case~ret | trial, 
	    data=normal.sample.data )
	trellis.device(theme=splus.theme())
	print(xxx)

christopherggreen/cggmisc documentation built on May 13, 2019, 7:04 p.m.