Draws line segments or rectangles. Mainly intended to be used in
conjunction with the segplot
function.
prepanel.segplot(x, y, z, subscripts, horizontal = TRUE, ...)panel.segplot(x, y, z, level = NULL, subscripts,
at,
draw.bands = is.factor(z),
col, alpha,
lty, lwd,
border,
col.symbol = col, alpha.symbol = alpha,
col.regions = regions$col,
band.height = 0.6,
horizontal = TRUE,
...,
segments.fun = panel.segments,
centers = NULL,
pch = 16)
Vectors corresponding to x1
, x2
and
y
respectively in the segplot
formula. The names are
different for compatibility with panel.levelplot
. These are
all the original vectors in data
, not subsetted for
particular panels.
optional vector controlling color of segments
optional vector of ‘centers’ of the segments.
If specified, points will be plotted at these y
-locations.
plotting character used for centers
.
integer subscript to be used as an indexing vector
for x
, y
, z
and level
, giving the packet
for the current panel.
logical, whether the segments are to be drawn horizontally (the default) or vertically. This essentially swaps the role of the x- and y-axes in each panel.
values of level
where color code changes
logical, whether to draw rectangles instead of lines
Graphical parameters for the
segment. Defaults to parameter settings for "plot.line"
or
"plot.polygon"
for segments and rectangles respectively.
col
is overridden by col.regions
if level
is
not null.
Graphical parameters for the point if
centers
are plotted. Defaults to the corresponding
parameters for the segment.
vector of colors as in levelplot
height of rectangles (applicable if
draw.bands
is TRUE
Other arguments, passed on to panel.rect
(when
draw.bands=TRUE
), segments.fun
(otherwise),
panel.points
(if centers
is not NULL
), etc. as
appropriate.
function used to plot segments when
draw.bands
is FALSE
. The default is to use
panel.segments
, but panel.arrows
is a
useful alternative (arguments to segments.fun
can be provided
via the …
argument, see example for
segplot
).
For prepanel.segplot
a list with components xlim
and
ylim
.