heat {LPS} | R Documentation |
Heatmap palette generation
Description
This function generates a ramp of colors for heat.map
derivated functions.
Usage
heat(colors = c("#8888FF", "#000000", "#FF4444"), n = 256, shapeFun = heat.exp, ...)
heat.exp(n, part, base = 1.015)
heat.lin(n, part)
Arguments
colors |
Character vector of length 3, determining starting, middle and final colors. |
n |
Single integer value, amount of colors / values to generate. |
shapeFun |
Function taking at least 2 arguments : |
... |
Further arguments to |
part |
Single integer, defined as 1 while generating colors between the first two boundaries, and 2 otherwise. |
base |
Single numeric value, base for exponential slope. |
Value
heat
returns a character vector of colors in hexadecimal representation.
heat.lin
and heat.expr
return n
numeric values, defining a curve whose slope will be mimiced during color interpolation.
Author(s)
Sylvain Mareschal
See Also
heat.map
, clusterize
, predict.LPS
Examples
# Classical heatmap colors
palette <- heat(c("green", "black", "red"))
heat.scale(zlim=c(-2,2), col.heatmap=palette)
# Two distinct shapes provided
heat.scale(zlim=c(-2,2), col.heatmap=heat(shapeFun=heat.lin))
heat.scale(zlim=c(-2,2), col.heatmap=heat(shapeFun=heat.exp))