Description Usage Arguments Details Author(s) References See Also Examples
Plots a color bar above a heatmap created with plotHeatmap
to annotate the columns.
1 | plotColorbarCol(groups, margin)
|
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 |
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.
Ole Christian Lingjaerde
Nilsen et al., "Identifying clusters in genomics data by recursive partitioning", 2013 (in review)
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.