Description Usage Arguments Value Examples
View source: R/get_col_gradient.R
Get color gradient for a colorRampPalette with n number of colors.
1 | get_col_gradient(colRamp, n = 50)
|
colRamp |
colorRampPalette functions object containing colors for palette. Use function get_col_palette() to create. |
n |
numeric. Number of colors in gradient |
A character vector, names of colors (hex).
1 2 3 4 5 | x <- LETTERS[1:6]
# The three lines of code below are equivalent
get_col_gradient(get_col_palette("RdBu"), 100)
get_col_palette("RdBu")(100)
colorRampPalette(RColorBrewer::brewer.pal(9, "RdBu"))(100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.