Description Usage Arguments Details See Also Examples
The SciencesPo scales add colors that work nicely with 'theme_flex()'.
1 2 3 | scale_color_flex(..., theme = "tableau20")
scale_fill_flex(..., theme = "tableau20")
|
... |
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. |
For use when 'color' is specified as an 'aes()' in a ggplot.
For use when 'fill' is specified as an 'aes()' in a ggplot.
[theme_flex()]
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')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.