scale_manual: SciencesPo colors and fills for ggplot2.

Description Usage Arguments Details See Also Examples

Description

The SciencesPo scales add colors that work nicely with 'theme_flex()'.

Usage

1
2
3
scale_color_flex(..., theme = "tableau20")

scale_fill_flex(..., theme = "tableau20")

Arguments

...

common discrete scale parameters: 'name', 'breaks', 'labels', 'na.value', 'limits' and 'guide'. See [discrete_scale()] for more details

theme

one of "tableau20", "tableau10", "colorblind" etc. This should match the 'theme_flex()' that is used with it.

Details

'scale_color_flex'

For use when 'color' is specified as an 'aes()' in a ggplot.

'scale_fill_flex'

For use when 'fill' is specified as an 'aes()' in a ggplot.

See Also

[theme_flex()]

Examples

1
2
3
4
5
6
7
8
9
# Plot some variables
p <- ggplot(mtcars) +
     geom_point(aes(x = wt, y = mpg, color = factor(gear))) +
     facet_wrap(~am)

# Plot with SciencesPo theme and colors
p +
    theme_flex() +
   scale_color_flex(theme = '538')

danielmarcelino/SciencesPo documentation built on Oct. 20, 2019, 1:15 a.m.