scale_color_tanagr: Creates palette to use with ggplot2 (scale_color)

Description Usage Arguments Examples

View source: R/choose_palette_ggp.R

Description

It generates a palette by linear interpolation for scale_color

Usage

1
scale_color_tanagr(palette_name, discrete = TRUE, ...)

Arguments

palette_name

the name of the palette

discrete

whether to use a discrete or continuous color palette (boolean)

...

additional arguments to pass to scale_color_gradientn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(ggplot2)
ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color = Species)) +
 geom_point(size  = 3) +
 geom_density2d() +
 theme_bw(base_size=12) +
 scale_color_tanagr(palette_name = "stilpnia_preciosa")

ggplot(iris, aes(x = Sepal.Width, y = Sepal.Length, color = Petal.Width)) +
 geom_point(size  = 4) +
 theme_bw(base_size=12) +
 scale_color_tanagr(palette_name = "chlorochrysa_nitidissima", discrete = FALSE)

cdanielcadena/tanagR documentation built on Aug. 22, 2020, 3:23 a.m.