Description Usage Arguments Examples
Display a single palette to see whether it meets your needs.
If no num
parameter is given,
all the colours in the palette will be displayed.
If num
is less than the number of colours in the palette,
then only the first num
colours will be displayed.
If num
is greater than the number of colours in the palette,
then that many colours will be generated by linear interpolation
over the vector of colours in the chosen palette.
1 | viz_palette(pal, ttl = deparse(substitute(pal)), num = length(pal))
|
pal |
character, vector of (hexadecimal) colours representing a palette |
ttl |
character, title to be displayed (the name of the palette) |
num |
numeric, the number of colours to display |
1 2 3 4 | viz_palette(gretchenalbrecht_palettes$rocker)
viz_palette(gretchenalbrecht_palettes$rocker, "rocker")
viz_palette(gretchenalbrecht_palettes$rocker, "rocker first 4", num = 4)
viz_palette(gretchenalbrecht_palettes$rocker, "rocker interpolated to 25", num = 25)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.