powered by
Creates different color palette functions
jcolors_contin( palette = c("default", "pal2", "pal3", "pal4", "pal10", "pal11", "pal12", "rainbow"), reverse = FALSE, interpolate = c("spline", "linear"), ... )
returns a function that takes an integer argument (the required number of colors), which then returns a character vector of colors
Character string indicating a palette of colors.
logical value indicating whether the color palette should be reversed. Defaults to FALSE
FALSE
Character string for color interpolation method. "linear" or "spline" interpolation available
other arguments to be passed to colorRampPalette. See colorRampPalette for details
colorRampPalette
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")
Run the code above in your browser using DataLab