The palette based on Metro Metro colors.
Use scale_color_metro_d
for discrete categories and
scale_color_metro_c
for a continuous scale.
Usage
scale_color_metro(
palette = "complement",
discrete = TRUE,
reverse = FALSE,
aesthetics = "color",
...
)
scale_color_metro_d(
palette = "complement",
discrete = TRUE,
reverse = FALSE,
aesthetics = "color",
...
)
scale_color_metro_c(
palette = "complement",
discrete = FALSE,
reverse = FALSE,
aesthetics = "color",
...
)
scale_colour_metro(
palette = "complement",
discrete = TRUE,
reverse = FALSE,
aesthetics = "color",
...
)
scale_colour_metro_c(
palette = "complement",
discrete = FALSE,
reverse = FALSE,
aesthetics = "color",
...
)
scale_colour_metro_d(
palette = "complement",
discrete = TRUE,
reverse = FALSE,
aesthetics = "color",
...
)
scale_fill_metro(
palette = "complement",
discrete = TRUE,
reverse = FALSE,
aesthetics = "fill",
...
)
scale_fill_metro_d(
palette = "complement",
discrete = TRUE,
reverse = FALSE,
aesthetics = "fill",
...
)
scale_fill_metro_c(
palette = "complement",
discrete = FALSE,
reverse = FALSE,
aesthetics = "fill",
...
)
Arguments
- palette
Character name of palette. Depending on the color scale, can be
"full"
,"ice"
,"rainbow"
,"complement"
,"contrast"
,"light"
(for dark themes),"black_first"
,full_original
, orblack_first_original
.- discrete
Boolean indicating whether color aesthetic is discrete or not.
- reverse
Boolean indicating whether the palette should be reversed.
- aesthetics
A vector of names of the aesthetics that this scale should be applied to (e.g.,
c('color', 'fill')
).- ...
Additional arguments to pass to
colorRampPalette()
.
Examples
library(ggplot2)
library(see)
ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
geom_boxplot() +
theme_modern() +
scale_fill_metro_d()
ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
geom_violin() +
theme_modern() +
scale_fill_metro_d(palette = "ice")
ggplot(iris, aes(x = Petal.Length, y = Petal.Width, color = Sepal.Length)) +
geom_point() +
theme_modern() +
scale_color_metro_c(palette = "rainbow")