trelliscope (version 0.9.7)

noMargins: 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

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

Run this code
## 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)

Run the code above in your browser using DataCamp Workspace