tableau_color_pal: Tableau Color Palettes (discrete)

Description Usage Arguments Details References See Also Examples

View source: R/tableau.R

Description

Color palettes used in Tableau.

Usage

1
2
3
4
5
tableau_color_pal(
  palette = "Tableau 10",
  type = c("regular", "ordered-sequential", "ordered-diverging"),
  direction = 1
)

Arguments

palette

Palette name. See Details for available palettes.

type

Type of palette. One of "regular", "ordered-diverging", or "ordered-sequential".

direction

If 1, the default, then use the original order of colors. If -1, then reverse the order.

Details

Tableau provides three types of color palettes: "regular" (discrete, qualitative categories), "ordered-sequential", and "ordered-diverging".

References

http://vis.stanford.edu/color-names/analyzer/

Maureen Stone, 'Designing Colors for Data' (slides), at the International Symposium on Computational Aesthetics in Graphics, Visualization, and Imaging, Banff, AB, Canada, June 22, 2007.

Heer, Jeffrey and Maureen Stone, 2012 'Color Naming Models for Color Selection, Image Editing and Palette Design', ACM Human Factors in Computing Systems (CHI) http://vis.stanford.edu/files/2012-ColorNameModels-CHI.pdf.

See Also

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

Examples

1
2
3
4
5
6
7
8
9
library("scales")

palettes <- ggthemes_data[["tableau"]][["color-palettes"]][["regular"]]
for (palname in names(palettes)) {
  pal <- tableau_color_pal(palname)
  max_n <- attr(pal, "max_n")
  show_col(pal(max_n))
  title(main = palname)
}

Example output



ggthemes documentation built on Jan. 20, 2021, 5:05 p.m.