View source: R/heatmaps-sampleAnnotation.R
anno_cat_legend | R Documentation |
Convenience function for generating a legend for anno_cat annotations.
anno_cat_legend(col, x = NULL, renamer = identity, title = "", ...)
col |
vector of colors, named by all levels of data (e.g. x) or not named |
x |
optional: vector of data to pair with unnamed col or check against named col |
renamer |
function applied to generate labels: from names(col) or levels of x |
title |
title of legend |
... |
Arguments passed on to
|
a ComplexHeatmap Legend class object
grid::grid.newpage()
ComplexHeatmap::draw(
anno_cat_legend(
col = c("ibd" = "blue", "nonibd" = "grey90"),
renamer = toupper, title = "Hi there, I'm a title"
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.