# R: Default Panel Function for levelplot

panel.levelplot {lattice} | R Documentation

## Default Panel Function for levelplot

### Description

This is the default panel function for `levelplot`.

### Usage

    panel.levelplot(x, y, z,
                    subscripts,
                    at = pretty(z),
                    shrink,
                    labels = NULL,
                    label.style = c("mixed", "flat", "align"),
                    contour = FALSE,
                    region = TRUE,
                    col = add.line$col,
                    lty = add.line$lty,
                    lwd = add.line$lwd,
                    ...,
                    col.regions = regions$col,
                    alpha.regions = regions$alpha)
    panel.contourplot(...)

### Arguments

`x, y, z` | variables defining the plot
`subscripts` | integer vector indicating what subset of `x`, `y` and `z` to draw
`at` | numeric vector specifying breakpoints for change in colors

`shrink`

either a numeric vector of length 2 (meant to work as both x and y components), or a list with components x and y which are numeric vectors of length 2. This allows the rectangles to be scaled proportional to the z-value. The specification can be made separately for widths (x) and heights (y). The elements of the length 2 numeric vector gives the minimum and maximum proportion of shrinkage (corresponding to min and max of z).

`labels`

either a logical scalar indicating whether the labels are to be drawn, or a character or expression vector giving the labels associated with the `at` values. Alternatively, `labels` can be a list with the following components:

`labels`:
  a character or expression vector giving the labels. This can be omitted, in which case the defaults will be used.
`col, cex, alpha`:
  graphical parameters for label texts
`fontfamily, fontface, font`:
  font used for the labels

`label.style`

controls how label positions and rotation are determined. A value of `"flat"` causes the label to be positioned where the contour is flattest, and the label is not rotated. A value of `"align"` causes the label to be drawn as far from the boundaries as possible, and the label is rotated to align with the contour at that point. The default is to mix these approaches, preferring the flattest location unless it is too close to the boundaries.

`contour` | logical, specifying whether contour lines should be drawn
`region` | logical, specifying whether inter-contour regions should be filled with the appropriate color
`col, lty, lwd` | graphical parameters for contour lines
`...` | extra parameters
`col.regions` | a vector of colors used if `region=TRUE`. Usually a subset of the colors are used, the exact number being one more than the length of `at`. These are chosen to be roughly equally spaced along `col.regions`. In the unusual case when `col.regions` is not longer than `at`, it is repeated to be as long as necessary.
`alpha.regions` | numeric scalar controlling transparency of facets

### Details

The same function is used for both `levelplot` and `contourplot` (which differ only in default values of some arguments). `panel.contourplot` is a simple wrapper to `panel.levelplot`.

When `contour=TRUE`, the `contourLines` function is used to calculate the contour lines.

### Author(s)

Deepayan Sarkar Deepayan.Sarkar@R-project.org

### See Also

`levelplot`, `contourLines`

[Package lattice version 0.16-5 Index]