Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/anchored.gradient.R
Create a color gradient with a color for zero
1 2 3 4 5 6 7 | anchored.gradient(
minColor = "blue",
maxColor = "red",
zeroColor = "white",
z = NULL,
vals = 100
)
|
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? |
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).
a gradient of color
Dustin Fife
string.to.colors
, number.to.colors
,
1 | #not shown yet
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.