anno_textbox | R Documentation |
Text box annotations
anno_textbox(align_to, text, background_gp = gpar(fill = "#DDDDDD", col = "#AAAAAA"),
which = c("row", "column"), by = "anno_link", side = c("right", "left"), ...)
align_to |
It controls how the text boxes are aligned to the heatmap rows. The value can be a categorical vector which have the same length as heatmap rows, or a list of row indices. It does not necessarily include all row indices. |
text |
The corresponding texts. The value should be a list of texts. To control graphics parameters of texts in the boxes, The value of |
background_gp |
Graphics for the background. |
which |
Only "row" is allowed. |
by |
Are text boxed arranged by |
side |
Side of the annotation to the heatmap. |
... |
Pass to |
require(circlize)
mat = matrix(rnorm(100*10), nrow = 100)
split = sample(letters[1:10], 100, replace = TRUE)
text = lapply(unique(split), function(x) {
data.frame(month.name, col = rand_color(12, friendly = TRUE), fontsize = runif(12, 6, 14))
})
names(text) = unique(split)
Heatmap(mat, cluster_rows = FALSE, row_split = split,
right_annotation = rowAnnotation(wc = anno_textbox(split, text))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.