HH (version 2.2-17)

ResizeEtc: Display multiple independent trellis objects on the same coordinated scale.

Description

This function is a wrapper for several of the functions in the latticeExtra package.

Usage

ResizeEtc(c.list,
           condlevelsName,
           x.same, y.same,
           layout,
           strip.values, strip.left.values,
           strip.par, strip.left.par,  ## only the second is effective
                                       ## when both are specified
           resize.height, resize.width,
           main,
           main.middle=.5,
           ...)

Arguments

Value

"trellis" object combining each of the individual plots in the c.list argument according to the specifications in the other arguments.

See Also

c.trellis, plot.likert

Examples

Run this code
## see the examples in ?HH:::plot.likert

require(grid)
require(lattice)
require(latticeExtra)
require(HH)

## This is the same example as in ?HH:::plot.likert
## Here, it is done with explicit use of ResizeEtc.

data(ProfChal)
ProfChal

AA <- plot.likert(ProfChal[[1]], box.width=unit(.4,"cm"), positive.order=TRUE)
BB <- plot.likert(ProfChal[[2]], box.width=unit(.4,"cm"), positive.order=TRUE)
CC <- plot.likert(ProfChal[[3]], box.width=unit(.4,"cm"), positive.order=TRUE)
DD <- plot.likert(ProfChal[[4]], box.width=unit(.4,"cm"), positive.order=TRUE)
EE <- plot.likert(ProfChal[[5]], box.width=unit(.4,"cm"), positive.order=TRUE)
FF <- plot.likert(ProfChal[[6]], box.width=unit(.4,"cm"), positive.order=TRUE)

BB

## print(AA, more=TRUE,  split=c(1,1,3,2))
## print(BB, more=TRUE,  split=c(2,1,3,2))
## print(CC, more=TRUE,  split=c(3,1,3,2))
## print(DD, more=TRUE,  split=c(1,2,3,2))
## print(EE, more=TRUE,  split=c(2,2,3,2))
## print(FF, more=FALSE, split=c(3,2,3,2))

ResizeEtc(c.list=c(FF,EE,DD,CC,BB,AA),
          layout=c(1,6), main="Not yet good enough")

Group <- rev(names(ProfChal))

ResizeEtc(c.list=c(FF,EE,DD,CC,BB,AA),
          condlevelsName='Group',
          x.same=TRUE,
          layout=c(1,6),
          strip.left.values=Group,
          strip.left.par=list(cex=.7, lines=5),
          resize.height=c(2,2,2,4,5,1)+.5,
          main='Is your job professionally challenging?',
          main.middle=.65)

Run the code above in your browser using DataLab