plotColorbarCol: Add a colorbar above a heatmap.

Description Usage Arguments Details Author(s) References See Also Examples

Description

Plots a color bar above a heatmap created with plotHeatmap to annotate the columns.

Usage

1
plotColorbarCol(groups, margin)

Arguments

groups

optional vector of the same length as the number of columns in the heatmap, and with values specifying the colors of the leaves in the dendrogram.

margin

optional vector of length 2 specifying the margins around the heatmap. The first component specifies the width of the inner margin (default value is 0.05) and the second component specifies the width of the outer margin (default value is 0.4). The inner margin surrounds the heatmap on all sides, while the outer margin is only present on the left side and top side of the heatmap. See details in help file for plotHeatmap for explanation on how to use this parameter.

Details

This method is designed to be used in conjunction with the method plotHeatmap. The argument value margin should match the one used in the call to plotHeatmap; for details on how to use this argument, see the help file for that method. The default values are the same as in plotHeatmap, hence if no margin is specified in the call to plotHeatmap, then no margin need to be specified in the call to plotColorbarCol either.

Author(s)

Ole Christian Lingjaerde

References

Nilsen et al., "Identifying clusters in genomics data by recursive partitioning", 2013 (in review)

See Also

plotHeatmap, plotColorbarRow

Examples

1
2
3
4
5
6
7
8
## Create a dummy data set with 50 rows and 100 columns
X = matrix(rnorm(50*100), 50)
colgroups = sample(1:3, 100, replace=TRUE)

## Plot a heatmap and then add a color bar on the left side
margin = c(0.1, 0)
plotHeatmap(X, margin)
plotColorbarCol(colgroups, margin)

Example output



clusterGenomics documentation built on May 2, 2019, 7:04 a.m.