ch_col_transparent | R Documentation |
ch_col_transparent
is used to adjust colour codes to introduce transparency.
ch_col_transparent(colour, trans)
colour |
Vector of colours you wish to add transparency to. |
trans |
Integer(s) describing the degree of transparency, from ~200 (slightly transparent) to <10 (very transparent). |
res |
returned updated colour code with transparency |
See original code on post in Stack Overflow plot points transparent in R
# plot randomly distributed data plot(rnorm(20),col='black') # create a transparent blue colour for plotting mycol <- ch_col_transparent('blue',100) # plot more random points in transparent blue colour points(rnorm(20),col=mycol) # add transparency to multiple colours ch_col_transparent( c('red','blue','green'), c(50,100,200))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.