jcolors_contin: continuous palettes of colors for figures

Description Usage Arguments Value Examples

Description

Creates different color palette functions

Usage

1
2
3
jcolors_contin(palette = c("default", "pal2", "pal3", "pal4", "pal10",
  "pal11", "pal12", "rainbow"), reverse = FALSE,
  interpolate = c("spline", "linear"), ...)

Arguments

palette

Character string indicating a palette of colors.

reverse

logical value indicating whether the color palette should be reversed. Defaults to FALSE

interpolate

Character string for color interpolation method. "linear" or "spline" interpolation available

...

other arguments to be passed to colorRampPalette. See colorRampPalette for details

Value

returns a function that takes an integer argument (the required number of colors), which then returns a character vector of colors

Examples

1
2
3
4
5
6
7
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")

jcolors documentation built on May 22, 2019, 9:03 a.m.