ggplot2-scales-continuous: Continuous scales to use for ggplot2

Description Usage Arguments Details Value Examples

Description

These functions provide the option to use continuous palettes along with the ggplot2 package. It goes without saying that it requires ggplot2 to work.

Usage

1
2
3
4
5

Arguments

palette

Name of palette as a string. Must be on the form packagename::palettename.

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

Details

Available package/palette combinations are available in the data.frame palettes_c_names.

Value

A ScaleContinuous object that can be added to a ggplot object

Examples

1
2
3
4
5
6
if (require('ggplot2')) {

  ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Petal.Length)) +
    geom_point() +
    scale_colour_paletteer_c("scico::tokyo")
}

paletteer documentation built on July 1, 2020, 5:35 p.m.