Description Usage Arguments Details Value References See Also Examples
Color interpolation
1 | colorRamp2(breaks, colors, transparency = 0, space = "LAB")
|
breaks |
A vector indicating numeric breaks |
colors |
A vector of colors which correspond to values in |
transparency |
A single value in |
space |
color space in which colors are interpolated. Value should be one of "RGB", "HSV", "HLS", "LAB", "XYZ", "sRGB", "LUV", see |
Colors are linearly interpolated according to break values and corresponding colors through CIE Lab color space (LAB
) by default.
Values exceeding breaks will be assigned with corresponding maximum or minimum colors.
It returns a function which accepts a vector of numeric values and returns interpolated colors.
Gu, Z. (2014) circlize implements and enhances circular visualization in R. Bioinformatics.
col2value
converts back to the original values by providing the color mapping function generated by colorRamp2
.
1 2 | col_fun = colorRamp2(c(-1, 0, 1), c("green", "white", "red"))
col_fun(c(-2, -1, -0.5, 0, 0.5, 1, 2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.