tintin_clrs | R Documentation |
This function creates a vector of colours along the selected colour map.
tintin_clrs(
n = 5,
alpha = 1,
begin = 0,
end = 1,
direction = 1,
option = "the_blue_lotus"
)
n |
The number of colors ( |
alpha |
The alpha transparency, a number in |
begin |
The (corrected) hue in |
end |
The (corrected) hue in |
direction |
Sets the order of colors in the scale. If 1, the default, colors are ordered from darkest to lightest. If -1, the order of colors is reversed. |
option |
A character string indicating the color map option to use. Options are available with tidy names (i.e., 'the_blue_lotus'):
|
Check the README for the display of the color palettes.
Semi-transparent colors (0 < alpha < 1
) are supported only on some
devices (see rgb
).
A character
vector of colors.
# without extrapolation: 5 or fewer colors
n <- 5
tintin_clrs(n, option = "the_blue_lotus")
image(
1:n, 1, as.matrix(1:n),
col = tintin_clrs(n, option = "the_blue_lotus"),
xlab = "Tintin darkblue n", ylab = "", xaxt = "n", yaxt = "n", bty = "n"
)
# with extrapolation: 6 or more colors
n <- 20
image(
1:n, 1, as.matrix(1:n),
col = tintin_clrs(n, option = "the_blue_lotus"),
xlab = "Tintin darkblue n", ylab = "", xaxt = "n", yaxt = "n", bty = "n"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.