act_scale_fill: Colors ggplots with palettes based on pre-fab palettes...

View source: R/act_scale_fill.R

act_scale_fillR Documentation

Colors ggplots with palettes based on pre-fab palettes included in this package, at no extra cost!

Description

Colors ggplots with palettes based on pre-fab palettes included in this package, at no extra cost!

Usage

act_scale_fill(palette = "ncezid", discrete = TRUE, reverse = FALSE, ...)

Arguments

palette

name of pre-fab palette on which to base output (in quotes)

discrete

boolean variable defaulting to TRUE. Set to FALSE if want to generate a continuous palette

reverse

boolean variable defaulting to FALSE. Set to TRUE if want to reverse

...

arguments passed to discrete_scale or scale_fill_gradientn, which do the work under the hood.

Value

A ggplot with colors that ROCK (or that are sort of boring, depending on the pre-fab palette chosen).

Examples

data("iris")
library(tidyverse)
ggplot(iris)+
  geom_histogram(aes(x = Petal.Length, fill = Species))+
  act_scale_fill("usaid")

deansayre/Rtesunate documentation built on July 25, 2024, 7:22 p.m.