Sciensano Continuous Color Scales
scale_sciensano_c.Rd
See pal_sciensano_c
for details.
Usage
scale_color_sciensano_c(
palette = c("red", "green", "red-yellow-green"),
alpha = 1,
reverse = FALSE,
...
)
scale_colour_sciensano_c(
palette = c("red", "green", "red-yellow-green"),
alpha = 1,
reverse = FALSE,
...
)
scale_fill_sciensano_c(
palette = c("red", "green", "red-yellow-green"),
alpha = 1,
reverse = FALSE,
...
)
Arguments
- palette
Palette type. There are 3 available options:
"red"
"green"
"red-yellow-green"
- alpha
Transparency level, a real number in (0, 1]. See
alpha
inrgb
for details.- reverse
Logical. Should the order of the colors be reversed?
- ...
additional parameters for
discrete_scale
Examples
if (FALSE) library("ggplot2")
library("reshape2")
#> Error in library("reshape2"): there is no package called ‘reshape2’
data("mtcars")
cor <- abs(cor(mtcars))
cor_melt <- melt(cor)
#> Error in melt(cor): could not find function "melt"
ggplot(
cor_melt,
aes(x = Var1, y = Var2, fill = value)
) +
geom_tile(colour = "black", size = 0.3) +
theme_bw() + scale_fill_sciensano_c("red-yellow-green")
#> Error in ggplot(cor_melt, aes(x = Var1, y = Var2, fill = value)): could not find function "ggplot"