scale_color_gretchenalbrecht: Setup colour palette for ggplot2

Description Usage Arguments Examples

Description

Setup colour palette for ggplot2

Usage

1
2
3
4
5
scale_color_gretchenalbrecht(..., palette = "rocker", discrete = TRUE,
  alpha = 1, reverse = FALSE)

scale_colour_gretchenalbrecht(..., palette = "rocker", discrete = TRUE,
  alpha = 1, reverse = FALSE)

Arguments

...

additional arguments to pass to scale_color_gradientn

palette

Choose from 'gretchenalbrecht_palettes' list

discrete

whether to use a discrete colour palette

alpha

transparency

reverse

logical, Reverse the order of the colours?

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
library(ggplot2)
ggplot(mtcars, aes(mpg, wt)) +
  geom_point(aes(colour = factor(cyl))) +
  scale_colour_gretchenalbrecht(palette="rocker")
ggplot(mtcars, aes(mpg, wt)) +
  geom_point(aes(colour = hp)) +
  scale_colour_gretchenalbrecht(palette="rocker", discrete = FALSE)
ggplot(data = mpg) +
  geom_point(mapping = aes(x = displ, y = hwy, color = class)) +
  scale_colour_gretchenalbrecht(palette="rocker")
ggplot(diamonds) + geom_bar(aes(x = cut, fill = clarity)) +
  scale_fill_gretchenalbrecht()
library(ggthemes)
data(nz_cart_census)
ggplot(nz_cart_census, aes(x=long, y=lat, group=group,
 fill=MedianIncome2013)) +
 scale_fill_gretchenalbrecht(palette="winter_light",
                             discrete=FALSE) +
 geom_polygon() + theme_map() + theme(legend.position="right")

dicook/gretchenalbrecht documentation built on May 13, 2019, 6:13 p.m.