View source: R/showColorsWithNames.R
A quick and dirty way to show colours with name labels in a plot, slightly modified from show_col() function in 'scales' library .
1 | showColorsWithNames(colours, label_names = TRUE, cex_label = 1, borders = NULL)
|
colours |
A character vector of colours, with or without names |
label_names |
Whether to show label names |
cex_label |
Size of printed labels, as multiplier of default size. |
borders |
Border color for each tile. Default uses par("fg"). Use border = NA to omit borders. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.