Each object specified by x
or y
will be
coerced into a list, and each object of the list will be coerced into
a matrix using the function as.matrix
. Each column of a matrix
will represent the vertical y-values for each individual plot in the
stacked plot. Horizontal x-values are discussed below.
stackplot
will plot a matrix of values as a series of
stacked
plots, where the individual columns are plotted using
the same x and y scales, but offset by the magnitude (= abs(max-min))
of the column.
If the object to be plotted is a Time Series object, the start
and end
values of the object will represent the first and last
horizontal x-values of the points to be plotted. The Time Series
will be coerced into matrix.
The limits of the horizontal x-axis and vertical y-axis will be
dictated by the data in the first object of the list.
If the object to be plotted is a list of matrices, and x
is not
specified, the horizontal x-values of the points to be plotted for a
given matrix will default to the rownames of that matrix. The rownames
can be either numeric
or character
. If the first matrix
of the list does not have rownames, then the horizontal x-values for
each matrix (and its corresponding plot) will default to range from 1
to the length of the columns of the respective matrix.
If the first matrix of the list does have specified rownames, then the
horizontal x-values assume the values of the rownames of the
respective matrix. However, if another matrix of the list does not
have specified rownames, then its horizontal x-values will default to
range from 1 to the length of the columns of that respective matrix.
The user can specify the type of plot (currently only "h" and "l") to
be drawn for every element of the list in x
or y
using
the vector type
. If the Nth element (N>1) in type
is NA
and the Nth element of the list in x
or y
exists, then
the type of plot for the Nth element of the list will be equal to the
type of plot for the N-1th element of the list. Similarly for
col
, which specifies the colors for each element of the list in
x
or y
.
The labels y.llabs
and y.rlabs
will be placed at the
"zero" lines of each individual plot starting from the bottom working
up to the top.