View source: R/utilities-patterns.R
fill_alpha | R Documentation |
This works much like alpha() in that it modifies the
transparency of fill colours. It differs in that fill_alpha()
also attempts
to set the transparency of <GridPattern>
objects.
fill_alpha(fill, alpha)
fill |
A fill colour given as a |
alpha |
A transparency value between 0 (transparent) and 1 (opaque),
parallel to |
A character
vector of colours, or list of <GridPattern>
objects.
# Typical colour input
fill_alpha("red", 0.5)
if (utils::packageVersion("grid") > "4.2") {
# Pattern input
fill_alpha(list(grid::linearGradient()), 0.5)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.