tb_palette | R Documentation |
Uses color interpolation to create a custom number of colors from a given palette.
tb_palette(n, palette_name = "classicTB")
n |
The number of colors to generate. |
palette_name |
The name of the palette to use ("mycolors", "classicTB", or "pathogenomics"). |
A character vector of n hex color codes.
# Generate 20 colors from the 'classicTB' palette
my_custom_colors <- tb_palette(20, "classicTB")
plot(1:20, 1:20, col = my_custom_colors, pch = 19, cex = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.