Learn R Programming

ggthemes (version 5.1.0)

tableau_gradient_pal: Tableau colour gradient palettes (continuous)

Description

Gradient color palettes using the diverging and sequential continous color palettes in Tableau. See tableau_color_pal() for discrete color palettes.

Usage

tableau_gradient_pal(palette = "Blue", type = "ordered-sequential")

tableau_seq_gradient_pal(palette = "Blue", ...)

tableau_div_gradient_pal(palette = "Orange-Blue Diverging", ...)

Arguments

palette

Palette name.

"ordered-sequential"

ggthemes:::rd_optlist(names(ggthemes::ggthemes_data$tableau[["color-palettes"]][["ordered-sequential"]]))

"ordered-diverging"

ggthemes:::rd_optlist(names(ggthemes::ggthemes_data$tableau[["color-palettes"]][["ordered-diverging"]]))

type

Palette type, either "ordered-sequential" or "ordered-diverging".

...

Arguments passed to tableau_gradient_pal.

See Also

Other colour tableau: scale_colour_gradient2_tableau(), scale_colour_gradient_tableau(), scale_colour_tableau(), tableau_color_pal()

Examples

Run this code
library("scales")

x <- seq(0, 1, length = 25)
r <- sqrt(outer(x ^ 2, x ^ 2, "+"))
palettes <-
  ggthemes_data[["tableau"]][["color-palettes"]][["ordered-sequential"]]
for (palname in names(palettes)) {
  col <- tableau_seq_gradient_pal(palname)(seq(0, 1, length = 12))
  image(r, col = col)
  title(main = palname)
}

Run the code above in your browser using DataLab