Remove Margins from Trellis/Lattice Plot

Description

Removes whitespace surrounding a trellis plot. Ideal for makeDisplay because when tiling multiple panels, a lot of space is wasted with the margins.

Usage

1
noMargins(..., topkey = FALSE, rightkey = FALSE)

Arguments

topkey

should extra space be added for a top key?

rightkey

should extra space be added for a right key?

...

a list of other parameters to be passed to par.settings

See Also

xyplot, makeDisplay

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
library(lattice)
xyplot(c(1:10) ~ c(1:10) | sample(letters[1:2], 10, replace=TRUE),
  par.settings=noMargins()
)

# with additional par.settings...
xyplot(c(1:10) ~ c(1:10) | sample(letters[1:2], 10, replace = TRUE),
  par.settings = noMargins(
    list(plot.symbol = list(col = "black"))
  )
)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.