transparentColorBase: Set Transparancey in Base Graphics

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/transparentColorBase.R

Description

Setting transparency in base graphics is not as easy as in Lattice, so here's a little functon to help.

Usage

1
transparentColorBase(color, alphaTrans = alphaTrans)

Arguments

color

The color, or a vector of colors from colors().

alphaTrans

The alpha transparency value between [0,1] with 0 opaque and 1 fully transparent.

Details

As above.

Value

The rgb value(s), which can be passed to any base graphics routine to get transparency.

Author(s)

Jeffrey H. Gove

See Also

col2rgb, rgb

Examples

1
2
3
4
5
## Not run: 
cols = transparentColorBase('red', alphaTrans=c(0.3,0.6,0.9))
symbols(c(1,1.5,2), c(1,1.5,2), circles=rep(1,3), bg=cols, xlim=c(0,4), ylim=c(0,4))

## End(Not run)

sampSurf documentation built on March 5, 2021, 5:06 p.m.