Skip to contents

Map continuous values to colors interpolated from a Benvi palette.

Usage

scale_colour_benvi_c(pal_name = "benvi_blue", direction = 1, ...)

scale_color_benvi_c(pal_name = "benvi_blue", direction = 1, ...)

scale_fill_benvi_c(pal_name = "benvi_blue", direction = 1, ...)

Arguments

pal_name

Name of the palette. Defaults to "benvi_blue".

direction

Either 1 or -1. Use -1 to reverse the palette.

...

Additional arguments passed to ggplot2::scale_colour_gradientn() or ggplot2::scale_fill_gradientn().

Value

A continuous ggplot2 scale that can be added to a ggplot object.

Examples

library(ggplot2)

ggplot(mtcars, aes(x = wt, y = mpg, color = hp)) +
  geom_point() +
  scale_color_benvi_c("benvi_blue")