anchored.gradient: Create a color gradient with a color for zero

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/anchored.gradient.R

Description

Create a color gradient with a color for zero

Usage

1
2
anchored.gradient(minColor = "blue", maxColor = "red",
  zeroColor = "white", z = NULL, vals = 100)

Arguments

minColor

what color corresponds to the minimum value?

maxColor

what color corresponds to the maximum value?

zeroColor

what color corresponds to the middle point value?

z

The vector of numbers corresponding to the colors?

vals

how many points should the final gradient have?

Details

Other functions (e.g., number.to.colors) create a color gradient by taking a range (min and max) and begining with color 1 and ending with color 2. The problem is that sometimes, there's a critical middle point (e.g., zero) and the min and max are not symmetric around the middle point. This function aleviates that problem by creating a middle point for a fixed value (set to zero).

Value

a gradient of color

Author(s)

Dustin Fife

See Also

string.to.colors, number.to.colors,

Examples

1
#not shown yet

fifer documentation built on May 30, 2017, 7:40 a.m.