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)
Run the code above in your browser using DataLab