scale_color_material {see} | R Documentation |
Material design color palette
Description
The palette based on material design colors. Use
scale_color_material_d()
for discrete categories and
scale_color_material_c()
for a continuous scale, or use the discrete
argument in scale_color_material()
.
Usage
scale_color_material(
palette = NULL,
discrete = TRUE,
reverse = FALSE,
aesthetics = "color",
...
)
scale_color_material_d(
palette = NULL,
discrete = TRUE,
reverse = FALSE,
aesthetics = "color",
...
)
scale_color_material_c(
palette = "contrast",
discrete = FALSE,
reverse = FALSE,
aesthetics = "color",
...
)
scale_colour_material(
palette = NULL,
discrete = TRUE,
reverse = FALSE,
aesthetics = "color",
...
)
scale_colour_material_c(
palette = "contrast",
discrete = FALSE,
reverse = FALSE,
aesthetics = "color",
...
)
scale_colour_material_d(
palette = NULL,
discrete = TRUE,
reverse = FALSE,
aesthetics = "color",
...
)
scale_fill_material(
palette = NULL,
discrete = TRUE,
reverse = FALSE,
aesthetics = "fill",
...
)
scale_fill_material_d(
palette = NULL,
discrete = TRUE,
reverse = FALSE,
aesthetics = "fill",
...
)
scale_fill_material_c(
palette = NULL,
discrete = FALSE,
reverse = FALSE,
aesthetics = "fill",
...
)
Arguments
palette |
Character name of palette. Depending on the color scale, can
be one of |
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., |
... |
Additional arguments to pass to |
Examples
library(ggplot2)
library(see)
ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
geom_boxplot() +
theme_modern() +
scale_fill_material()
ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
geom_violin() +
theme_modern() +
scale_fill_material(palette = "ice")
ggplot(iris, aes(x = Petal.Length, y = Petal.Width, color = Sepal.Length)) +
geom_point() +
theme_modern() +
scale_color_material(discrete = FALSE)