Skip to contents

This function creates a fill scale using the MNB color palette for ggplot2.

Usage

scale_fill_mnb(values = NULL)

Arguments

values

Optional. A vector of color names. Will be translated to closest MNB color.

Value

A ggplot2 fill scale object.

Examples

ggplot2::ggplot(iris, ggplot2::aes(Species, Sepal.Length, fill = Species)) +
  ggplot2::geom_boxplot() +
  scale_fill_mnb()


ggplot2::ggplot(iris) + 
  ggplot2::aes(Sepal.Length, Sepal.Width, fill = Species) +
  ggplot2::geom_boxplot() + 
  scale_fill_mnb(values = c("red4", "blue", "yellow"))