View source: R/contin_jcolors.R
jcolors_contin | R Documentation |
Creates different color palette functions
jcolors_contin(
palette = c("default", "pal2", "pal3", "pal4", "pal10", "pal11", "pal12", "rainbow"),
reverse = FALSE,
interpolate = c("spline", "linear"),
...
)
palette |
Character string indicating a palette of colors. |
reverse |
logical value indicating whether the color palette should be reversed. Defaults
to |
interpolate |
Character string for color interpolation method. "linear" or "spline" interpolation available |
... |
other arguments to be passed to |
returns a function that takes an integer argument (the required number of colors), which then returns a character vector of colors
colfunc <- jcolors_contin()
jcols <- colfunc(1000)
n <- length(jcols)
image(1:n, 1, as.matrix(1:n),
col = jcols,
xlab = "", ylab = "",
xaxt = "n", yaxt = "n", bty = "n")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.