Description Usage Arguments Details Value See Also Examples
Get a color palette with a specific number of colors.
1 2 | get_color_palette(pal_func = viridis_magma_palette, color_no = 20,
display = TRUE, rev = FALSE, ...)
|
pal_func |
A function that returns the output function from |
color_no |
The number of colors in the palette. Default: 20 |
display |
A logical for displaying a pie chart of the palette. Default: TRUE |
rev |
A logical that will reverse the order of the color palette. |
... |
Parameters for the pal_func. |
This function is meant to be a plugin style function for users to created palettes.
Returns a color palette in the form of a character vector.
Other Color Palettes: combination_palette
,
scico_palette
,
viridis_magma_palette
,
viridis_palette
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
if(interactive()){
# This example uses data that are no longer available in the MicrobiomeR package,
# however, they can be easily generated with \code{\link{MicrobiomeR}{as_analyzed_format}}.
library(MicrobiomeR)
analyzed_silva <- as_MicrobiomeR_format(MicrobiomeR::raw_silva_2, "analyzed_format")
data <- analyzed_silva$data$stats_tax_data$Phylum
data_len <- length(unique(data))
custom_pal <- get_color_palette(color_no=data_len)
print(custom_pal)
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.