Produce a barplot with extra annotation.
labeledBarplot(
Matrix, labels,
colorLabels = FALSE,
colored = TRUE,
setStdMargins = TRUE,
stdErrors = NULL,
cex.lab = NULL,
xLabelsAngle = 45,
...)
None.
vector or a matrix to be plotted.
labels to annotate the bars underneath the barplot.
logical: should the labels be interpreted as colors? If TRUE
, the bars will
be labeled by colored squares instead of text. See details.
logical: should the bars be divided into segments and colored? If TRUE
, assumes
the labels
can be interpreted as colors, and the input
Matrix
is square and the rows have the same labels as the columns. See details.
if TRUE
, the function wil set margins c(3, 3, 2, 2)+0.2
.
if given, error bars corresponding to 1.96*stdErrors
will be plotted on top of
the bars.
character expansion factor for axis labels, including the text labels underneath the barplot.
angle at which text labels under the barplot will be printed.
other parameters for the function barplot
.
Peter Langfelder
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.