| setAlpha | R Documentation |
Takes a named color such as "red" or "darkgreen" and adds a level of transparency based on the alpha setting.
setAlpha(x, alpha = 0.2)
x |
character string; a text string corresponding to an R color |
alpha |
numeric [0-1]; sets the level of transparency. |
setAlpha is a convenience function that uses the col2rgb and rgb to add transparancy to named colors.
An rbg color with transparancy alpha.
makeColorMatrix, rainbow, col2rgb, rgb.
plot(1,1,col="white",xlim=c(0,10),ylim=c(0,10))
rect(1,1,7,7,col=setAlpha("darkblue"))
rect(3,3,9,9, col=setAlpha("red"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.