layoutCollapse: Set the lattice 'par.settings' to remove all marginal space.

Description Usage Arguments Details Value Author(s) Examples

View source: R/layoutCollapse.R

Description

Set the lattice par.settings to remove all marginal space. By default layoutHeightsCollapse and layoutWidthsCollapse set everything in layout.heights or layout.widths to 0 except for panel. The user can specify values for all the standard items in either of those items.
layoutCollapse by default sets layout=c(1,1), collapses to 0 all heights and widths except for panel, removes all labels and strip labels, and sets all axis lines to col="transparent".

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
layoutCollapse(x,
               xlab="",
               ylab="",
               xlab.top=NULL,
               ylab.right=NULL,
               main=NULL,
               sub=NULL,
               strip=FALSE,
               strip.left=FALSE,
               layout.heights=layoutHeightsCollapse(),
               layout.widths=layoutWidthsCollapse(),
               strip.border=list(col="transparent"),
               axis.line=list(col="transparent"),
               layout=c(1,1),
               ...)
layoutHeightsCollapse(...)
layoutWidthsCollapse(...)

Arguments

...

For layoutCollapse any argument to update.trellis.

For layoutHeightsCollapse any item name in trellis.par.get()$layout.heights.

For layoutWidthsCollapse any item name in trellis.par.get()$layout.widths.

x

Any "trellis" object.

xlab, ylab, xlab.top, ylab.right, main, sub

Standard xyplot arguments.

strip, strip.left, strip.border, axis.line, layout

Standard xyplot arguments.

layout.heights, layout.widths

Arguments to trellis.par.get.

Details

When very small plots are placed inside a LaTeX tabular environment, it is often helpful to suppress margins, axes, labels, titles.

Value

For layoutHeightsCollapse and layoutWidthsCollapse, a list which may be used as input to the par.settings argument in a lattice call. For layoutCollapse, a "trellis" object.

Author(s)

Richard M. Heiberger <[email protected]>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
lattice::trellis.par.get("layout.heights")
lattice::trellis.par.get("layout.widths")
layoutHeightsCollapse()
layoutWidthsCollapse()
layoutWidthsCollapse(axis.left=1)
## Not run: 
  A <- lattice::xyplot(Sepal.Length ~ Sepal.Width | Species, data=iris)

  A                 ## one page with three panels

  layoutCollapse(A) ## three pages with one unlabeled panel on each

  layoutCollapse(A, ## one page with panels labeled by ylab
                 layout=c(1,3),
                 ylab=levels(iris$Species),
                 layout.heights=list(axis.bottom=1),
                 layout.widths=list(axis.left=1),
                 axis.line=list(col="green"))

## End(Not run)

## Please see the package documentation for a simple example in context.

## Please see the demos for more interesting examples.
## demo(package="microplot")

microplot documentation built on Jan. 11, 2018, 1:02 a.m.