viewPalette | R Documentation |
This will create a plot of a color ramp
viewPalette(col, border = "transparent", name = "")
col |
the color palette to be visualised |
border |
color of the segment borders. Defaults to "transparent" |
name |
an optional name to be put into the plot |
Tim Appelhans
library(colorspace)
library(viridisLite)
clrs <- list(rainbow = rainbow(100),
rainbow_grey = desaturate(rainbow(100)),
viridis = viridis(100),
viridis_grey = desaturate(viridis(100)),
inferno = inferno(100),
inferno_grey = desaturate(inferno(100)),
magma = magma(100),
magma_grey = desaturate(magma(100)))
out <- lapply(seq(clrs), function(i) {
viewPalette(clrs[[i]], name = names(clrs)[i])
})
Orcs::latticeCombineGrid(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.