scale_fill_EJ: Load ggplot2 scale for colour aesthetic options based on EJ...

Description Usage Arguments Value Author(s) Examples

View source: R/scale_fill_EJ.R

Description

Load ggplot2 scale for colour aesthetic options based on EJ colours

Usage

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

Arguments

palette

Character name of palette in EJ_palettes

discrete

Boolean indicating whether the discrete variable used

reverse

Boolean indicating whether the palette should be reversed

...

Additional arguments to pass to discrete_scale() or scale_color_gradientn()

Value

vector() of selected colours based on palette argument

Author(s)

Eugene Joh, MPH ejoh@bu.edu

Examples

1
2
3
4
5
6
data(mtcars)

data(mtcars)
ggplot(mtcars, aes(x=wt,y=disp, col=as.factor(gear), size=mpg)) +
  geom_point() +
  scale_colour_EJ(palette="main", discrete=TRUE, reverse=TRUE)

eugejoh/RpalEJ documentation built on May 17, 2019, 7:05 p.m.