Plot color bars corresponding to modules, usually beneath a dendrogram.
plotHclustColors(dendro, colors, rowLabels = NULL, cex.rowLabels = 0.9, ...)
A dendrogram such as returned by hclust
.
Coloring of objects on the dendrogram. Either a vector (one color per object) or a matrix (can also be an array or a data frame) with each column giving one color per object. Each column will be plotted as a horizontal row of colors under the dendrogram.
Labels for the colorings given in colors
. The labels will be printed to the
left of the color rows in the plot. If the argument is given, it must be a vector of length
equal to the number of columns in colors
. If not given, names(colors)
will be used if available. If not, sequential numbers
starting from 1 will be used.
Font size scale factor for the row labels. See par
.
Other parameters to be passed on to the plotting method (such as main
for the main
title etc).
None.
It is often useful to plot module assignment (by color) that was obtained by cutting a hierarchical
dendrogram, to visually check whether the obtained modules are meaningful, or which one of several
possible module assignments looks best. One way to do it to section the screen into two parts, plot the
dendrogram (via plot(hclust)
) in the upper section and use this function to plot colors in the
order corresponding to the dendrogram in the lower section.
cutreeDynamic
for module detection in a dendrogram.