Description Usage Arguments See Also Examples
Color scales based on the Moffitt Branding Guidelines, 2014.
1 2 3 4 5 | scale_colour_moffitt(color_other = "grey", direction = 1, ...)
scale_color_moffitt(color_other = "grey", direction = 1, ...)
scale_fill_moffitt(color_other = "grey", direction = 1, ...)
|
color_other |
When the data contains two values, the second value takes this color. Can be any of the colors in moffitt_colors other than blue: green, red, orange, light_blue, yellow, or grey (default). |
direction |
Reverses the direction of the color scale when |
... |
Arguments passed on to
|
moffitt_colors theme_moffitt()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | library(ggplot2)
ggplot(mtcars) +
aes(mpg, wt, color = paste(vs)) +
geom_point(size = 2) +
theme_moffitt() +
scale_color_moffitt()
ggplot(mtcars) +
aes(mpg, wt, color = paste(vs)) +
geom_point(size = 2) +
theme_moffitt() +
scale_color_moffitt(color_other = "green")
ggplot(mtcars) +
aes(mpg, wt, color = paste(carb)) +
geom_point(size = 2) +
theme_moffitt() +
scale_color_moffitt()
dplyr::count(mpg, class, sort = TRUE) %>%
dplyr::mutate(class = factor(class, levels = class)) %>%
ggplot() +
aes(class, n, fill = class) +
geom_col() +
coord_flip() +
theme_moffitt() +
scale_fill_moffitt()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.