scale_color_rail: Setup colour palette for ggplot2

Description Usage Arguments Examples

View source: R/scales.R

Description

Setup colour palette for ggplot2

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
scale_color_rail(
  ...,
  palette = "aberdeen",
  discrete = TRUE,
  alpha = 1,
  reverse = FALSE
)

scale_colour_rail(
  ...,
  palette = "aberdeen",
  discrete = TRUE,
  alpha = 1,
  reverse = FALSE
)

Arguments

...

additional arguments to pass to scale_color_gradientn

palette

Choose from 'rail_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
library(tidyverse)
ggplot(data = diamonds) +
geom_bar(mapping = aes(x = cut, fill = cut)) 
+ theme_wordfig() + scale_fill_rail(palette="aberdeen")

library(tidyverse)
ggplot(data = diamonds) +
geom_bar(mapping = aes(x = cut, fill = cut)) 
+ theme_wordfig() + scale_fill_rail(palette="aberdeen")

petermacp/pmthemes documentation built on Aug. 16, 2020, 11:19 p.m.