scale_fill_ifr10: Apply IFR colour palette to ggplot object with seven to ten...

View source: R/scale_fill_ifr10.R

scale_fill_ifr10R Documentation

Apply IFR colour palette to ggplot object with seven to ten colours

Description

This function is added to a ggplot object to apply a custom IFR colour palette.

Usage

scale_fill_ifr10(...)

Details

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_fill_ifr.

Examples

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")

InStreamFisheries/IFRthemes documentation built on July 6, 2023, 3:24 p.m.