Trellis graphics panel functions for time series and signal plotting,
called during the rendering of output of
trellisPlot.timeSeries
or
trellisPlot.signalSeries.
USAGE:
panel.timeSeries(x, y, subscripts, groups,
hloc.type=trellis.par.get("style.type")$hloc.type,
plot.type=trellis.par.get("style.type")$plot.type,
...)
panel.signalSeries(x, y, subscripts, groups, ...)
panel.stackbar(x, y, subscripts, groups, cum=T,
lwd=trellis.par.get("stackbar")$lwd,
lty=trellis.par.get("stackbar")$lty,
line.col=trellis.par.get("stackbar")$line.col,
fill.col=trellis.par.get("stackbar")$fill.col,
density=trellis.par.get("stackbar")$density,
angle=trellis.par.get("stackbar")$angle)
panel.hloc(x, y, subscripts, groups, type="l",
lwd=<<see below>>, lty=<<see below>>,
col=<<see below>>, width=<<see below>>,
...)
REQUIRED ARGUMENTS:
x
horizontal coordinates of data points.
y
vertical coordinates of data points.
subscripts
subscripts for original data that describe where x
and y came from.
groups
a factor or character vector that describes the groups
that all the data points belong to.
groups[subscripts] is
the same length as
x and
y and gives the groups
corresponding to the
x and
y values on this panel.
OPTIONAL ARGUMENTS:
hloc.type
plotting parameters for making high-low-open-close plots.
plot.type
plotting parameters for making line plots.
vectors to concatenate.
...
other graphical parameters.
cum
if T, the y values are given as the total cumulative heights of bars; if
F, the y values are the heights of the individual bar sections.
lwd
line width, as in
par; for
panel.hloc, the default comes from
either
trellis.par.get("hloc.line") or
trellis.par.get("hloc.candle"),
depending on
type.
lty
line type, as in
par; for
panel.hloc, the default comes from
either
trellis.par.get("hloc.line") or
trellis.par.get("hloc.candle"),
depending on
type.
line.col
color for the bar outlines, as in
par("col").
fill.col
color for filling the bars, as in
par("col").
density of shading lines for the bars, in lines per inch, or -1 to
fill solidly; this can also be a vector giving the density for each
level of bar.
angle
angle of shading lines for the bars, in degrees counterclockwise
from horizontal; this can also be a vector giving the angle for each
level of bar.
type
style of HLOC indicators.
"c" for so-called "candlesticks",
which have vertical lines
running from low to high, broken by a rectangular box from open to
close. The rectangular box is filled if close is lower than open, and
unfilled if open is lower than close.
"l" for vertical lines
running from low to high, with a tick
mark to the left for open and to the right for close.
col
color, as in
par; for
panel.hloc, the default comes from
either
trellis.par.get("hloc.line") or
trellis.par.get("hloc.candle"),
depending on
type.
width
width of the open-close indicator boxes or ticks;
for
panel.hloc, the default comes from
either
trellis.par.get("hloc.line") or
trellis.par.get("hloc.candle"),
depending on
type.
SIDE EFFECTS:
The appropriate type of plot is added to the current plotting device,
a group at a time in the order specified by the levels of groups.
The graphical parameters are adjusted for each group.
panel.timeSeries
is the master panel for time series plotting;
it calls
panel.superpose,
panel.stackbar, and/or
panel.hloc to
render the data.
panel.signalSeries
is the master panel for signal plotting;
it calls
panel.superpose to render the data.
panel.stackbar
is a panel function for making stacked-bar plots.
panel.hloc
is a panel function for making high-low-open-close plots.