Internal Plotting Function

DESCRIPTION:

Calculate the data frame to pass to xyplot for Trellis plotting of time series or signals.

USAGE:

as.trellis.data.frame.series(x, ...,  xlim=NULL, ylim=NULL,  
                             plot.type=NULL, 
                             x.axis.args=NULL, y.axis.args=NULL, 
                             scales=NULL, log.axes="c",  
                             complex.convert=Mod, layout=NULL, 
                             frame.call=sys.nframe(), 
                             frame.function=frame.call) 
as.trellis.data.frame.signal(x, ..., xlim=NULL, ylim=NULL,  
                             x.axis.args=NULL, y.axis.args=NULL, 
                             scales=NULL, layout=NULL, log.axes="c", 
                             magnitude=F, phase=F, real=F, im=F, 
                             dB=F, type="l", frame.call=sys.nframe(), 
                             frame.function=frame.call) 

REQUIRED ARGUMENTS:

x
first time series or signal argument to plot.

OPTIONAL ARGUMENTS:

...
additional time series, signal, or graphical arguments.
xlim
the range of x values to use for plotting.
ylim
the range of y values to use for plotting.
plot.type
a character string indicating the type of plot. Possible values are "lines", "hloc", and "stackbar" for plotting lines/points, high-low-open-close bars, and stacked bars respectively.
x.axis.args
a list of parameters to pass to the axis.numeric (for signal) or axis.time (for time series) functions for customizing the x-axis.
y.axis.args
a list of parameters to pass to the axis.numeric function for customizing the y-axis.
scales
a list with optional x and y components for passing into the scales argument of xyplot. Typically, this is used to make the x or y axes for each panel have separate scales, by setting the x or y component of scales to list(relation="free").
layout
the layout of the Trellis panels for the plot, e.g. c(2,3) for a two-row, three-column layout.
log.axes
set to "xy", "x", or "y" to make the corresponding axis or axes logarithmic. Any other value makes them linear. Only the y-axis can be logarithmic for time series plotting.
complex.convert
function used to convert complex numbers to real for plotting.
magnitude
if TRUE, create a panel with the magnitude of the y values.
phase
if TRUE, create a panel with the phase of the y values.
real
if TRUE, create a panel with the real part of the y values.
im
if TRUE, create a panel with the imaginary part of the y values.
dB
if TRUE, create a panel with a dB plot (y values are converted to dB by taking 10 * log10(Mod(y))).
type
type of lines or points to plot: "p", "l", "b", "o", "n", "s", and "h" produce points, lines, both, both (overlaid), nothing, stairsteps, and high-density lines, respectively. This can also be a vector giving the type for each set of y coordinates.
frame.call
frame to evaluate sys.call and deparse(substitute()) in to figure out data set names (passed to parse.time.series.dotargs or parse.signal.dotargs).
frame.function
frame to evaluate sys.function in to figure out the plot function arguments (passed to parse.time.series.dotargs or parse.signal.dotargs).

VALUE:

a data frame suitable for passing to xyplot for Trellis plotting.

DETAILS:

These functions are meant to be called from trellisPlot.timeSeries and trellisPlot.signalSeries, to calculate a data frame containing ordered factor columns encoding the series name, plot type, and other information, which is then rendered in the panel.t function.

SEE ALSO:

, .