AddAlpha | R Documentation |
add alpha level to color that lacks one
AddAlpha(plotclr, alpha = 0.5, verbose = 0)
plotclr |
color to be modified |
alpha |
alpha level |
verbose |
level of verbosity |
modified color with alpha value
Markus Loecher
#example:
#require(RColorBrewer)
if (requireNamespace("RColorBrewer", quietly = TRUE)) {
plotclr <- RColorBrewer::brewer.pal(8,"YlOrRd")
plotclr = AddAlpha(plotclr,0.5)
} else {
print("package RColorBrewer must be installed for this example")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.