lattice (version 0.3-1)

panel.functions: Useful Panel Functions

Description

These are predefined panel functions available in Trellis for use in constructing new panel functions (usually on-the-fly).

Usage

panel.abline(a, b, ...)
panel.abline(coef, ...)
panel.abline(reg, ...)
panel.abline(h= ,v= , ...)
panel.fill(col="grey", ...)
panel.grid(h=3, v=3, ...)
panel.lmline(x,y,...) = panel.abline(lm(y~x),...)
panel.loess(x, y, span=2/3, iter=3, ...)
panel.mathdensity(dmath = dnorm, args = list(mean=0, sd=1))

Arguments

x, y
numeric variates
a, b
Coefficients of the line to be added
coef
Coefficients of the line to be added as a length 2 vector
reg
A regression object. The corresponding fitted line will be drawn
h,v
For panel.abline, numerical vectors giving y and x locations respectively of horizontal and vertical lines to be added to the plot. For panel.grid, number of horizontal and vertical reference lines to be added to the plot; h=-1 and v=-1 make t
col
color
span, iter
arguments to the R function lowess. panel.loess is essentially a wrapper on lowess
dmath
A vectorized function that produces density values given a numeric vector named x, e.g., dnorm
args
list giving additional arguments to be passed to dmath
...
graphical parameters can be supplied. see function definition for details.

synopsis

panel.abline(a, b = NULL, h = numeric(0), v = numeric(0), col = add.line$col, lty = add.line$lty, lwd = add.line$lwd, ...)

Details

panel.abline adds a line of the form y=a+bx or vertical and/or horizontal lines. Graphical parameters are obtained from reference.line for panel.grid, and add.line for the others (can be set using trellis.par.set )

panel.mathdensity plots a (usually theoretical) probability density function. Can be useful in conjunction with histogram and densityplot to visually estimate goodness of fit.

See Also

lowess, trellis.par.get