View source: R/scale_colour_ifr10.R
scale_colour_ifr10 | R Documentation |
This function is added to a ggplot object to apply a custom IFR colour palette.
scale_colour_ifr10(...)
A colour-blind friend colour palette that can be applied to plots with seven to ten colours.
For plots with less than seven colours, use scale_colour_ifr
.
ChickWeight %>%
mutate(Chick = as.factor(Chick)) %>%
group_by(Chick) %>%
summarise(Mean = mean(weight),
.groups = 'drop') %>%
slice(1:10) %>%
ggplot(., aes(x = Chick, y = Mean, fill = Chick)) +
geom_col() +
scale_fill_ifr10() +
theme_ifr() +
theme(legend.position = "none")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.