scale_colour_discrete: # Discrete fill/colour scales ——– Scale color discrete...

Description Usage Arguments See Also Examples

View source: R/scales.R

Description

Overwrites the default discrete color scale with SGB-palette pal_sgb_pref. To use another palette or custom colors, use scale_color_manual().

Usage

1

Arguments

...

parameters passed on to scale_color_manual().

See Also

Other colour scales: scale_colour_gradient(), scale_fill_discrete(), scale_fill_gradient()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
library(ggplot2)
library(gsgb)
theme_set(theme_sgb(base_size = 9))

ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) +
  geom_point()

# This gives the same:
ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) +
  geom_point() +
  scale_color_discrete()

# To change color scale:
ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Species)) +
  geom_point() +
  scale_color_manual(values = rev(usecol(pal_sgb_rot)))

## End(Not run)

SchweizerischerGewerkschaftsbund/gsgb documentation built on Dec. 18, 2021, 1 p.m.