trelliscope (version 0.9.7)

plot.trsPre: Plot results form prepanel

Description

Plot results form prepanel

Usage

"plot"(x, layout = c(2, 2), as.table = TRUE, strip = FALSE, strip.left = TRUE, between = list(y = 0.25), xlab = "Rank", ylab = "Panel Limits", ...)

Arguments

x
object of class "trsPre" created by prepanel
layout, as.table, strip, strip.left, between, xlab, ylab, ...
parameters for the lattice plot that is output (these are defaults - can ignore unless you want fine control)

Value

object of class "trellis" (plotted by default)

Details

This function plots the sorted axis ranges for the x and y axis for the case of "same" (all axis limits share the same range) and "sliced" (all axis limits share the) and can be useful in helping determine how to ultimately set the limits.

See Also

prepanel, makeDisplay

Examples

Run this code
## Not run: 
# irisSplit <- datadr::divide(iris, "Species")
# irisPreFn <- function(x) {
#   list(
#     xlim = range(x$Sepal.Length),
#     ylim = range(x$Sepal.Width)
#   )
# }
# irisPre <- prepanel(irisSplit, prepanelFn = irisPreFn)
# plot(irisPre)
# ## End(Not run)

d <- datadr::divide(iris, "Species")

irisPreFn <- function(x) {
  list(
    xlim = range(x$Sepal.Length),
    ylim = range(x$Sepal.Width)
  )
}

irisPre <- prepanel(d, prepanelFn = irisPreFn)

plot(irisPre)

irisLims <- setLims(irisPre, x = "same", y = "sliced")

Run the code above in your browser using DataLab