style_scale_color: Color Scale Constructor for ggplot

View source: R/style_scale_color.R

style_scale_colorR Documentation

Color Scale Constructor for ggplot

Description

The purpose of style_scale_color is to make our own colors! This includes the "duck hunt" color palette!

Usage

style_scale_color(palette = "main", discrete = T, reverse = F, ...)

Arguments

palette

Character name of palette in cllr_palettes

discrete

Boolean; Is the color aesthetic discrete or not?

reverse

Boolean; Should the colors be reversed?

...

Additional arguments which can be passed to ggplot2::disrete_scale() or ggplot2::scale_color_gradientn(), used when discrete is true or false, respectively

Details

There are four color schemes to choose from: 1) "main" = simple colors, duckhunt; "NULL" value 2) "duckhunt" = palette from duckhunt 3) "cblind" = color blind palette 4) "gray" = gray scale if you're boring If discrete = F, will pick gradient between discrete colors

Value

An object of class "ggproto", for use in ggplot2::ggplot

Examples

# Create a scatterplot
ggplot2::ggplot(iris, ggplot2::aes(Sepal.Width,Sepal.Length, color=Species)) +
  ggplot2::geom_point(size=5) +
  style_scale_color()

Huh/collar documentation built on Aug. 5, 2022, 11:02 p.m.