scale_fill_pancan: Fill scale creator to add gnomeR colors in ggplot

Description Usage Arguments Examples

View source: R/gnomer_color_palette.R

Description

This fill scale generator will interpolate between the colors in the palette provided

Usage

1
2
scale_fill_pancan(palette = "sunset", discrete = TRUE,
  reverse = FALSE, ...)

Arguments

palette

Character name of palette in msk_palettes, supplied in quotes. Options include "main", "pancan", "sunset" (default).

discrete

Boolean indicating whether color aesthetic is discrete or not. Default is TRUE.

reverse

Boolean indicating whether the palette should be reversed. Default is FALSE.

...

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

Examples

1
2
3
4
5
6
7
library(ggplot2)

# use a fill color
# alternative use that involves interpolation
ggplot(iris, aes(x = Sepal.Length, fill = Species)) +
geom_histogram(bins = 20, position = "dodge") +
scale_fill_pancan()

margarethannum/gnomeR documentation built on Feb. 26, 2020, 8:16 p.m.