draw-HeatmapAnnotation-method {ComplexHeatmap} | R Documentation |
Draw the heatmap annotations
## S4 method for signature 'HeatmapAnnotation' draw(object, index, k = NULL, n = NULL, align_to = "bottom", ...)
object |
a |
index |
a vector of order. |
k |
if row annotation is splitted, the value identifies which row slice. |
n |
total number of row slices. |
align_to |
if the allocated space is more than than the column annotation itself, should the viewport be aligned to the top or bottom? |
... |
pass to |
A viewport is created. Mostly, this method is used inside draw,HeatmapList-method
.
No value is returned.
Zuguang Gu <z.gu@dkfz.de>
df = data.frame(type = c("a", "a", "a", "b", "b", "b")) ha = HeatmapAnnotation(df = df) grid.newpage(); draw(ha, 1:6) grid.newpage(); draw(ha, 6:1) ha = HeatmapAnnotation(df = df, col = list(type = c("a" = "red", "b" = "blue"))) grid.newpage(); draw(ha, 1:6) ha = HeatmapAnnotation(df = df, col = list(type = c("a" = "red", "b" = "blue")), which = "row") grid.newpage(); draw(ha, 1:6) ha = HeatmapAnnotation(points = anno_points(1:6)) grid.newpage(); draw(ha, 1:6) ha = HeatmapAnnotation(histogram = anno_barplot(1:6)) grid.newpage(); draw(ha, 1:6) mat = matrix(rnorm(36), 6) ha = HeatmapAnnotation(boxplot = anno_boxplot(mat)) grid.newpage(); draw(ha, 1:6)