Skip to contents

These functions provide the option to use Benvi colors inside continuous palettes with the ggplot2 package.

Usage

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

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

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

Arguments

pal_name

Name of the palette. Defaults to "qual_2".

direction

Either 1 or -1. If -1 the palette will be reversed.

...

Arguments to pass on to ggplot2::scale_colour_gradientn() or ggplot2::scale_fill_gradientn()

Value

A ScaleContinuous object that can be added to a ggplot object

Examples


if (require('ggplot2')) {

  ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Petal.Length)) +
    geom_point() +
    scale_colour_benvi_c("qual_9")
}
#> Loading required package: ggplot2