Description Usage Arguments Details Value See Also Examples
Map numeric cell contents smoothly to colors
1 2 3 4 5 6 7 |
... |
Colors |
range |
Numeric endpoints. If |
na_color |
Color to return for |
ignore_na |
If |
colwise |
Logical. Calculate breaks separately within each column? |
by_colorspace
requires the "scales" package.
A function for use in map_***
functions.
mapping-functions
Other mapping functions:
by_cases()
,
by_function()
,
by_quantiles()
,
by_ranges()
,
by_regex()
,
by_rows()
,
by_values()
1 2 3 4 5 6 7 8 9 | if (! requireNamespace("scales")) {
stop("Please install the \"scales\" package to run this example")
}
ht <- as_hux(matrix(rnorm(25), 5, 5))
map_background_color(ht,
by_colorspace("red", "yellow", "blue"))
map_background_color(ht,
by_colorspace("red", "yellow", "blue",
colwise = TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.