Skip to contents

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

Usage

scale_color_mnb(values = NULL)

Arguments

values

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

Value

A ggplot2 color scale object.

Examples

library(ggplot2)
ggplot2::ggplot(iris) + 
  ggplot2::aes(Sepal.Length, Sepal.Width, color = Species) +
  ggplot2::geom_point(size = 3) + 
  scale_color_mnb()


ggplot2::ggplot(iris) + 
  ggplot2::aes(Sepal.Length, Sepal.Width, color = Species) +
  ggplot2::geom_point(size = 3) + 
  scale_color_mnb(values = c("red4", "blue", "yellow"))