Description Usage Arguments Value Author(s) See Also Examples
small utilities functions to deal with colors in R
1 | makeTransparent(someColor, alpha = 100)
|
someColor |
any color code what R understands as character |
alpha |
numeric 0 ... 100 setting the transparancy, 0 no color, 100 full color |
return a color code which can be used in plot( , col = )
Maik Renner, mrenner [at] bgc-jena.mpg.de
Maik Renner, mrenner [at] bgc-jena.mpg.de
<https://stackoverflow.com/questions/8047668/transparent-equivalent-of-given-color>
1 2 3 4 5 6 7 8 9 | makeTransparent("green")
makeTransparent("green", alpha = 0.1)
makeTransparent(makeTransparent("green", alpha = 0.1))
plot(0,0, pch = 16, col = "green", cex = 5)
points(0.1,0, pch = 15, col = makeTransparent("green", alpha = 50), cex = 5 )
set.seed(688)
xp = rnorm(7)
yp = rnorm(7)
polygon(xp, yp, border = 3, col = makeTransparent("green", alpha = 80) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.