labeledBarplot {WGCNA} | R Documentation |
Barplot with text or color labels.
Description
Produce a barplot with extra annotation.
Usage
labeledBarplot(
Matrix, labels,
colorLabels = FALSE,
colored = TRUE,
setStdMargins = TRUE,
stdErrors = NULL,
cex.lab = NULL,
xLabelsAngle = 45,
...)
Arguments
Matrix |
vector or a matrix to be plotted. |
labels |
labels to annotate the bars underneath the barplot. |
colorLabels |
logical: should the labels be interpreted as colors? If |
colored |
logical: should the bars be divided into segments and colored? If |
setStdMargins |
if |
stdErrors |
if given, error bars corresponding to |
cex.lab |
character expansion factor for axis labels, including the text labels underneath the barplot. |
xLabelsAngle |
angle at which text labels under the barplot will be printed. |
... |
other parameters for the function |
Details
Individual bars in the barplot can be identified either by printing the text of the corresponding entry
in labels
underneath the bar at the angle specified by xLabelsAngle
,
or by interpreting the labels
entry as a
color (see below) and drawing a correspondingly colored square underneath the bar.
For reasons of compatibility with other functions, labels
are interpreted as colors after
stripping the first two characters from each label. For example, the label "MEturquoise"
is
interpreted as the color turquoise.
If colored
is set, the code assumes that labels
can be interpreted as colors, and the input
Matrix
is square and the rows have the same labels as the columns. Each bar in the barplot is then
sectioned into contributions from each row entry in Matrix
and is colored by the color given by the
entry in labels
that corresponds to the row.
Value
None.
Author(s)
Peter Langfelder