| showPalettes | R Documentation |
For each specified palette class, display each palette in the class as a strip of colors in a single multi-panel PDF file.
showPalettes(palette=c("sequential", "hues", "viridis", "wesanderson"),
n=12, border="transparent", file=NULL)
palette |
Name of the palette class to display, one of |
n |
Number of colors per palette. Default is 12 colors. |
border |
Color of the border between color strips, or |
file |
Name of the PDF file to write. Default is the palette class name with a |
Four palette classes are available:
"sequential": HCL sequential palettes for each of 12 hues across the HCL color wheel in 30-degree intervals, plus grayscale.
"hues": 16 qualitative palettes based on the HCL hue wheel, shown for all combinations of chroma and luminance from c \in \{20, 40, 60, 80\} and l \in \{20, 40, 60, 80\}, each labeled with its c and l values.
"viridis": The viridis, cividis, plasma, and spectral palettes.
"wesanderson": Palettes from the wesanderson package (which must be installed separately).
David W. Gerbing (Portland State University; gerbing@pdx.edu)
# default: sequential HCL palettes
#showPalettes()
# hues palettes across c x l grid
#showPalettes("hues")
# viridis palettes, simulate continuity with many small color blocks
#showPalettes("viridis", n=500, border="off")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.