| viridis_colormap | R Documentation |
Returns the viridis color palette. A convenience wrapper around
grDevices::hcl.colors that mimics the viridis color scheme
without requiring extra packages.
viridis_colormap(n, alpha = 1, direction = 1)
n |
Number of colors. |
alpha |
Alpha channel value (0-1). |
direction |
Forward (1) or reversed (-1) direction. |
A character vector of hex color strings.
cols <- viridis_colormap(10)
plot(1:10, pch = 19, col = cols, cex = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.