View source: R/ColorMapping-class.R
ColorMapping | R Documentation |
Constructor Method for ColorMapping Class
ColorMapping(name, colors = NULL, levels = NULL,
col_fun = NULL, breaks = NULL, na_col = "#FFFFFF", full_col = NULL)
name |
Name for this color mapping. The name is automatically generated if it is not specified. |
colors |
Discrete colors. |
levels |
Levels that correspond to |
col_fun |
Color mapping function that maps continuous values to colors. |
breaks |
Breaks for the continuous color mapping. If |
na_col |
Colors for |
full_col |
A super set of |
colors
and levels
are used for discrete color mapping, col_fun
and
breaks
are used for continuous color mapping.
A ColorMapping-class
object.
Zuguang Gu <z.gu@dkfz.de>
cm = ColorMapping(colors = c("A" = "red", "B" = "black"))
cm
require(circlize)
col_fun = colorRamp2(c(0, 1), c("white", "red"))
cm = ColorMapping(col_fun = col_fun)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.