Utility function to translate values into colors.
Utility function to translate values into colors.
val2col(x, gradientPalette = NULL, zlim = NULL, gradient.range.quantile = 0.95)
x |
input values |
gradientPalette |
gradient palette (default=NULL). If NULL, use colorRampPalette(c('gray90','red'), space = "Lab")(1024) if the values are non-negative; otherwise colorRampPalette(c("blue", "grey90", "red"), space = "Lab")(1024) is used |
zlim |
a two-value vector specifying limits of the values that should correspond to the extremes of the color gradient |
gradient.range.quantile |
extreme quantiles of values that should be trimmed prior to color mapping (default=0.95) |
colors <- val2col( rnorm(10) )
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.