Heatplus (version 2.18.0)

annHeatmap2: Annotated heatmaps


This function plots a data matrix as intensity heatmap, with optional dendrograms, annotation panels and clustering for both rows and columns. This is the actual working function called by numerous wrappers.


annHeatmap2(x, dendrogram, annotation, cluster, labels, 
            scale = c("row", "col", "none"), breaks=256, col = g2r.colors,
            legend = FALSE)


the numerical matrix to be shown as heatmap
a list that controls how row- and column diagrams are determined and displayed
a list that controls the data and the way it is shown in row- and column annotation panels
a list that controls how many clusters are chosen, and how these clusters are labelled and colored
a list that controls the row- and column labels, as well as their size and placement
a character string indicating how the matrix x is standardized (by row, by column or not at all). This affects only display, not dendrograms or clustering
specifies the interval breaks for displaying the data in x; either a vector of explicit interval breaks, or just the desired number of intervals. See niceBreaks for details.
specifies a palette of colors for the heatmap intensities; either a vector of explicit color definitions (one less than breaks) or a palette function. See breakColors.
whether and where to draw a legend for the colors/intervals in the heatmap. If TRUE, a legend is placed in a position determined by the function to be suitable; alternatively, integer values 1-4 indicate the side where the legend is to be drawn; and FALSE indicates that no legend should be drawn.


  • An object of class annHeatmap. Use plot to display it graphically.


Arguments scale, breaks, col and legend control different aspects of the whole plot directly as described. Arguments dendrogram, annotation, cluster and labels control aspects that may differ for the rows and columns of the central heatmap and have a special structure: each is a named list with different entries controling e.g. the look of a dendrogram, the data for annotation etc. Additionally, they can contain two extra entries called simply Row and Col; these are again named lists that can contain all the same entries as the parent list. Entries specified directly in the list apply to both rows and columns; entries specified as part of Row or Col override these defaults for the rows or columns only. Recognized parameters for argument dendrogram: [object Object],[object Object],[object Object],[object Object],[object Object] Recognized entries for argument annotation: [object Object],[object Object],[object Object],[object Object] Recognized entries for argument cluster: [object Object],[object Object],[object Object],[object Object]

Recognized entries for argument labels: [object Object],[object Object],[object Object],[object Object]

See Also

heatmapLayout, niceBreaks, breakColors, g2r.colors


Run this code
ex1 = sample.ExpressionSet[51:85,]
map1 = annHeatmap2(exprs(ex1), ann=list(Col=list(data=pData(ex1))),

Run the code above in your browser using DataCamp Workspace