plotClusters | R Documentation |
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 y-limit selections.
plotClusters(
x,
cls,
k,
each = TRUE,
type = "rng",
fill = TRUE,
border = 0,
time,
time.at,
avg = "median",
q = 0.9,
norm,
cls.col,
cls.srt,
axes = TRUE,
xlab,
xlim,
ylab,
ylab.size = TRUE,
ylab.cex = 1,
ylim = ifelse(each, "avg", "rng"),
ylim.scale = 0.1,
avg.col = "#000000",
avg.lty = 1,
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,
sample.ticks = TRUE,
vline = "",
vl_col = 0,
vl_lwd = 3,
vl_lty = 1,
ref.xy,
ref.col = "#C0C0C080",
ref.ylab = "",
ref.log = FALSE,
...
)
x |
either a simple data matrix with time points (x-axis) in
columns, or a processed time-series 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 |
fill |
fill data ranges with transparent version of cluster color |
border |
line width of border line at data ranges |
time |
optional numeric vector specifiying x-axis 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 |
either numeric (0.5-1, or 0), or a string. If numeric it
indicates the fraction of data shown as transparent ranges,
e.g. |
norm |
normalization of the time-series 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 |
axes |
add axes (bottom and left) |
xlab |
x-axis label (auto-selected if missing) |
xlim |
|
ylab |
y-axis label (only used if |
ylab.size |
add cluster size to cluster-wise ylab |
ylab.cex |
font size of ylab |
ylim |
either conventional range of the y-axis, 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.lty |
line type for average plots |
avg.lwd |
line width for average plots |
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 |
sample.ticks |
draw ticks on top axis for each actual sample |
vline |
x coordinates for vertical lines, useful e.g. to mark replicates |
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 |
y-axis label (right y-axis) for reference data |
ref.log |
logarithmic axis 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.