Usage
panel.abline(a = NULL, b = 0,
h = NULL, v = NULL,
reg = NULL, coef = NULL,
col, col.line, lty, lwd, alpha, type,
...,
reference = FALSE,
identifier = "abline")
panel.refline(...) panel.curve(expr, from, to, n = 101,
curve.type = "l",
col, lty, lwd, type,
...,
identifier = "curve")
panel.rug(x = NULL, y = NULL,
regular = TRUE,
start = if (regular) 0 else 0.97,
end = if (regular) 0.03 else 1,
x.units = rep("npc", 2),
y.units = rep("npc", 2),
col, col.line, lty, lwd, alpha,
...,
identifier = "rug")
panel.average(x, y, fun = mean, horizontal = TRUE,
lwd, lty, col, col.line, type,
...,
identifier = "linejoin")
panel.linejoin(x, y, fun = mean, horizontal = TRUE,
lwd, lty, col, col.line, type,
...,
identifier = "linejoin")panel.fill(col, border, ..., identifier = "fill")
panel.grid(h=3, v=3, col, col.line, lty, lwd, x, y, ..., identifier = "grid")
panel.lmline(x, y, ..., identifier = "lmline")
panel.mathdensity(dmath = dnorm, args = list(mean=0, sd=1),
n = 50, col, col.line, lwd, lty, type,
..., identifier = "mathdensity")
Arguments
x, y
Variables defining the contents of the panel.
In panel.grid
these are optional and are used only to choose
an appropriate method of pretty
. a, b
Coefficients of the line to be added by
panel.abline
. a
can be a vector of length 2,
representing the coefficients of the line to be added, in which case
b
should be missing. a
can also be
coef
Coefficients of the line to be added as a vector of
length 2.
reg
A (linear) regression object, with a coef
method that gives the coefficints of the corresponding regression
line. h, v
For panel.abline
, these are numeric vectors giving
locations respectively of horizontal and vertical lines to be added
to the plot, in native coordinates. For panel.grid
, these usually specify the number of
horiz
reference
A logical flag determining whether the default
graphical parameters for panel.abline
should be taken from
the reference.line parameter settings. The default is to
take them from the add.line sett
expr
An expression considered as a function of x
, or a
function, to be plotted as a curve.
n
The number of points to use for drawing the curve.
from, to
optional lower and upper x-limits of curve. If
missing, limits of current panel are used
curve.type
Type of curve ("p"
for points, etc), passed
to llines
regular
A logical flag indicating whether the rug is
to be drawn on the regular side (left / bottom) or not
(right / top).
start, end
endpoints of rug segments, in normalized parent
coordinates (between 0 and 1). Defaults depend on value of
regular
, and cover 3% of the panel width and height.
x.units, y.units
Character vectors, replicated to be of length two. Specifies the
(grid) units associated with start
and end
above.
x.units
and y.units
are for the rug on the x-axis and
y-axis respectively (
col, col.line, lty, lwd, alpha, border
Graphical parameters.
type
Usually ignored by the panel functions documented here;
the argument is present only to make sure an explicitly specified
type
argument (perhaps meant for another function) does not
affect the display.
fun
The function that will be applied to the subset of
x
values (or y
if horizontal
is FALSE
)
determined by the unique values of y
(x
).
horizontal
A logical flag. If FALSE
, the plot is
transposed in the sense that the roles of x
and
y
are switched; x
is now the factor.
Interpretation of other arguments
dmath
A vectorized function that produces density values given
a numeric vector named x
, e.g., dnorm
. args
A list giving additional arguments to be passed to
dmath
.
...
Further arguments, typically graphical parameters,
passed on to other low-level functions as appropriate. Color can
usually be specified by col
, col.line
, and
col.symbol
, the last two overriding the firs
identifier
A character string that is prepended to the names of grobs
that are created by this panel function.