get_col_gradient | R Documentation |
Get color gradient for a colorRampPalette with n number of colors.
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 |
x <- LETTERS1:6
A character vector, names of colors (hex).
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.