matrix2heatColors | R Documentation |
Convert numeric matrix to heatmap colors
matrix2heatColors(
x,
colorV = group2colors(colnames(x)),
defaultBaseColor = "#FFFFFF",
transformFunc = c,
lens = 0,
shareLimit = TRUE,
numLimitFactor = 0.95,
numLimit = NULL,
baseline = 0,
color_below_baseline = "#FFFFFF",
divergent = FALSE,
rampN = 15,
trimRamp = c(0, 0),
verbose = FALSE,
...
)
x |
|
colorV |
|
defaultBaseColor |
|
transformFunc |
|
lens |
|
shareLimit |
|
numLimitFactor |
|
numLimit |
|
baseline |
|
color_below_baseline |
|
divergent |
|
rampN |
|
trimRamp |
|
verbose |
|
... |
additional arguments are passed to |
This function is intended as a rapid way of applying a color
gradient to columns of numeric values, where each column
has its own base color. It calls jamba::getColorRamp()
for each column, and when supplied with one color, it
creates a color gradient from "grey95"
to the output
of jamba::color2gradient()
.
When lens
is non-zero, the color gradient is warped in order
to intensify the color saturation across the numeric range.
Other colorjam assignment:
col_div_xf()
,
col_linear_xf()
,
group2colors()
,
rainbowJamMulti()
,
vals2colorLevels()
,
vibrant_color_by_hue()
set.seed(123);
# generate a random numeric matrix
m1 <- matrix(ncol=12, rnorm(120));
m1n <- m1;
m1n[] <- format(round(abs(m1), digits=2), trim=TRUE);
jamba::imageByColors(
matrix2heatColors(abs(m1),
transformFunc=c,
divergent=FALSE,
lens=-5,
shareNumLimit=TRUE,
baseline=0,
numLimit=4),
cellnote=m1n);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.