plotHclustColors: Plot color rows corresponding to modules

View source: R/Functions.R

plotHclustColorsR Documentation

Plot color rows corresponding to modules

Description

Plot color bars corresponding to modules, usually beneath a dendrogram.

Usage

plotHclustColors(dendro, colors, rowLabels = NULL, cex.rowLabels = 0.9, ...)

Arguments

dendro

A dendrogram such as returned by hclust.

colors

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.

rowLabels

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.

cex.rowLabels

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).

Details

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.

Value

None.

Author(s)

Steve Horvath SHorvath@mednet.ucla.edu and Peter Langfelder Peter.Langfelder@gmail.com

See Also

cutreeDynamic for module detection in a dendrogram.


moduleColor documentation built on April 9, 2022, 5:05 p.m.