tableau_color_pal | R Documentation |
Color palettes used in Tableau.
tableau_color_pal(
palette = "Tableau 10",
type = c("regular", "ordered-sequential", "ordered-diverging"),
direction = 1
)
palette |
Palette name. See Details for available palettes. |
type |
Type of palette. One of |
direction |
If 1, the default, then use the original order of colors. If -1, then reverse the order. |
Tableau provides three types of color palettes:
"regular"
(discrete, qualitative categories),
"ordered-sequential"
, and "ordered-diverging"
.
"regular"
"ordered-diverging"
"ordered-sequential"
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.
Other colour tableau:
scale_colour_gradient2_tableau()
,
scale_colour_gradient_tableau()
,
scale_colour_tableau()
,
tableau_gradient_pal()
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.