Description Usage Arguments Value Note See Also Examples
View source: R/visColoralpha.r
visColoralpha
is supposed to add transparent (alpha) into
colors.
1 | visColoralpha(col, alpha)
|
col |
input colors. It can be vector of R color specifications, such as a color name (as listed by 'colors()), a hexadecimal string of the form "#rrggbb" or "#rrggbbaa" |
alpha |
numeric vector of values in the range [0, 1] for alpha transparency channel (0 means transparent and 1 means opaque) |
a vector of colors (after transparent being added)
none
1 2 3 4 5 6 7 8 | # 1) define "blue-white-red" colormap
palette.name <- visColormap(colormap="bwr")
# 2) use the return function "palette.name" to generate 10 colors spanning "bwr"
col <- palette.name(10)
# 3) add transparent (alpha=0.5)
cols <- visColoralpha(col, alpha=0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.