tcol | R Documentation |
Add alpha transparency to colors.
tcol(col, alpha = 1)
col |
a vector of color names, hexadecimal strings, or integers which
correspond to the current |
alpha |
the alpha transparency in |
as.hexmode
; col2rgb
; adjustcolor
;
rgb
;
cols <- c('red', 'green', 'blue')
## a normal plot
plot(rnorm(100), col = tcol(cols), pch = 16, cex = 4)
## more transparent
plot(x <- rnorm(100), col = tcol(cols, 0.5), pch = 16, cex = 4)
## hexadecimal strings also work
cols <- c('#FF0000', '#00FF00', '#0000FF')
plot(rnorm(100), col = tcol(cols, c(0.2, 0.4, 1)), pch = 16, cex = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.