smoothPalette: Create a gradient corresponding to a numeric vector

Description Usage Arguments Details

View source: R/smoothPalette.R

Description

Create a gradient corresponding to a numeric vector

Usage

1
2
smoothPalette(x, max = NULL, min = NULL, palfunc = NULL, n = 10,
  symmetrical = FALSE)

Arguments

x

a numeric vector

max

value which corresponds to the right-hand side of the color gradient

min

value which corresponds to the left-hand side of the color

palfunc

palette function as returned by colorRampPalette. By default, it is a function generating a gradient from blue through white to red.

n

how many steps in the gradient

symmetrical

whether the palette should be symmetrical around 0 (with default palette, that means that "0" corresponds to the color "white"

Details

This function "converts" numbers to colors. It generates a gradient based on a particular palette function in which each color corresponds to a value or value range in a numeric vector. The lowest value (or the value equal to min, if specified) corresponds to one extreme of the gradient, and the highest (or the value equal to max, if specified) to the other extreme of the gradient.


january3/myfuncs documentation built on April 1, 2020, 4:42 a.m.