plots average time series of clusters as calculated by
clusterAverages
, including
variations around the average as transparent areas, or all individual data.
The function is quite flexible and allows to normalize the data and
set automatic ylimit selections.
1 2 3 4 5 6 7 8  plotClusters(x, cls, k, each = TRUE, type = "rng", time, time.at,
avg = "median", q = 0.9, norm, cls.col, cls.srt, xlab, xlim, ylab,
ylim = ifelse(each, "avg", "rng"), ylim.scale = 0.1,
avg.col = "#000000", avg.lwd = 3, avg.cex = 1, avg.pch = 1,
lwd = 0.5, use.lty = FALSE, alpha = 0.2, embed = FALSE,
plot.legend = FALSE, leg.xy = "topleft", leg.ids, vline = "",
vl_col = 0, vl_lwd = 3, vl_lty = 1, ref.xy, ref.col = "#C0C0C080",
ref.ylab = "", ...)

x 
either a simple data matrix with time points (xaxis) in columns,
or a processed timeseries as provided by

cls 
eiter a vector ( 
k 
integer or string specifiying the clustering (k:
cluster numbers) to be used if cls is of class 'clustering';
if missing (default) the ‘selected’ clustering from 
each 
logical value indicating whether to plot all cluster
averages on one panel ( 
type 
string specifying the type of plot: "rng" for plotting
only data ranges (see argument 
time 
optional numeric vector specifiying xaxis time coordinates 
time.at 
argument 
avg 
a function (or the name of a function as a string)
for calculating an ‘average’ value for each cluster; default is
the 
q 
the fraction of data to be shown in the ranges plots: either
numeric 01, or a function name for calculating variance (eg. "sd", "var").
Note that this parameter can also influence 
norm 
normalization of the timeseries data, must be a function
that transforms the data, available via segmenTools are

cls.col 
optional named cluster color vector, where names indicate the clusters (as.caracter(cls)); if cls is of class 'clustering' it is taken from there 
cls.srt 
optional cluster sorting, can be used for selection of subsets of clusters; if cls is of class 'clustering' it is taken from there 
xlab 
xaxis label (autoselected if missing) 
xlim 

ylab 
yaxis label (only used if 
ylim 
either conventional range of the yaxis, or a string
specifying whether ylim should be calculated from the average
( 
ylim.scale 
if 
avg.col 
color for average line; used only if 
avg.lwd 
line width for average plots (if 
avg.cex 
point size for average plots 
avg.pch 
point symbol for average plots 
lwd 
line width for indidiual time series plots (if 
use.lty 
use individual line types (if 
alpha 
set alpha value of range or individual time series colors (color opaqueness) 
embed 
logical, if TRUE and argument 
plot.legend 
add a legend, useful for very small clusters and mainly
used in the 
leg.xy 
position of the legend, see

leg.ids 
a named vector providing alternative IDs for legends; the names should correspond to the rownames of clusterings in 
vline 
adds a vertical line at position x[i] 
vl_col 
color for vertical line (default to cluster colour) 
vl_lwd 
vertical line width 
vl_lty 
vertical line type 
ref.xy 
reference data (either x or xy coordinates, see

ref.col 
color for reference data plot 
ref.ylab 
yaxis label (right yaxis) for reference data 
... 
further arguments to the basic setup call to

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.