Learn R Programming

see (version 0.4.1)

scale_color_material: Material design color palette

Description

The palette based on material design colors (https://www.materialui.co/color). Use scale_color_material_d() for discrete categories and scale_color_material_c() for a continuous scale.

Usage

scale_color_material(
  palette = "contrast",
  discrete = TRUE,
  reverse = FALSE,
  ...
)

scale_color_material_d( palette = "contrast", discrete = TRUE, reverse = FALSE, ... )

scale_color_material_c( palette = "contrast", discrete = FALSE, reverse = FALSE, ... )

scale_colour_material( palette = "contrast", discrete = TRUE, reverse = FALSE, ... )

scale_colour_material_c( palette = "contrast", discrete = FALSE, reverse = FALSE, ... )

scale_colour_material_d( palette = "contrast", discrete = TRUE, reverse = FALSE, ... )

scale_fill_material( palette = "contrast", discrete = TRUE, reverse = FALSE, ... )

scale_fill_material_d( palette = "contrast", discrete = TRUE, reverse = FALSE, ... )

scale_fill_material_c( palette = "contrast", discrete = FALSE, reverse = FALSE, ... )

Arguments

palette

Character name of palette. Can be "full", "ice", "rainbow", "complement", or "contrast".

discrete

Boolean indicating whether color aesthetic is discrete or not.

reverse

Boolean indicating whether the palette should be reversed.

...

Additional arguments to pass to colorRampPalette().

Examples

Run this code
# NOT RUN {
library(ggplot2)
library(see)

ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
  geom_boxplot() +
  theme_modern() +
  scale_fill_material_d()

ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
  geom_violin() +
  theme_modern() +
  scale_fill_material_d(palette = "ice")

ggplot(iris, aes(x = Petal.Length, y = Petal.Width, color = Sepal.Length)) +
  geom_point() +
  theme_modern() +
  scale_color_material_c(palette = "rainbow")

# }

Run the code above in your browser using DataLab