scale_color_gmri: GMRI-ggplot2 Scale Color Palettes

View source: R/gmri_palettes.R

scale_color_gmriR Documentation

GMRI-ggplot2 Scale Color Palettes

Description

GMRI-ggplot2 Scale Color Palettes

Usage

scale_color_gmri(palette = "main", discrete = TRUE, reverse = FALSE, ...)

Arguments

palette

Character name of palette in gmri_palettes

discrete

Boolean indicating whether color aesthetic is discrete or not

reverse

Boolean indicating whether the palette should be reversed

...

Additional arguments passed to discrete_scale() or scale_color_gradientn(), used respectively when discrete is TRUE or FALSE

Examples

#Color by discrete variable using default palette
# ggplot2::ggplot(iris, ggplot2::aes(Sepal.Width, Sepal.Length, color = Species)) +
#  ggplot2::geom_point(size = 4) +
#  scale_color_gmri()

#Color by numeric variable with cool palette
# ggplot2::ggplot(iris, ggplot2::aes(Sepal.Width, Sepal.Length, color = Sepal.Length)) +
#  ggplot2::geom_point(size = 4, alpha = .6) +
#  scale_color_gmri(discrete = FALSE, palette = "cool")


gulfofmaine/gmRi documentation built on Jan. 26, 2025, 5:12 a.m.