scale_color_orange: Color scale constructor

Description Usage Arguments See Also Examples

Description

This function specifies a palette, whether the palette is being applied based on a discrete or numeric variable, whether to reverse the palette colors, and additional arguments to pass to the relevant ggplot2 function (which differs for discrete or numeric mapping).

Usage

1
2
scale_color_orange(palette = "main", discrete = TRUE, reverse = FALSE,
  na_value = "grey50", ...)

Arguments

palette

Character name of a palette. One of "main", "secondary", "grey", "blue", "green", "pink", "purple" or "yellow".

discrete

Boolean indicating whether color aesthetic is discrete or not.

reverse

Boolean indicating whether the palette should be reversed.

na_value

Character name of a color for NA values.

...

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

See Also

orange_colors, orange_palettes, scale_fill_orange

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library("ggplot2")

ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) +
  geom_point(size = 4) +
  scale_color_orange(palette = "secondary", discrete = TRUE) +
  theme_minimal()

ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Petal.Length)) +
  geom_point(size = 4) +
  scale_color_orange(palette = "blue", discrete = FALSE) +
  theme_minimal()

thoera/colorange documentation built on May 26, 2019, 5:32 a.m.