Learn R Programming

itsadug (version 1.0.1)

alpha: Utility function.

Description

Wrapper around adjustcolor.

Usage

alpha(x, f = 0.5)

Arguments

x
A color or a vector with color values.
f
A number for adjusting the transparency ranging from 0 (completely transparent) to 1 (not transparent).

Note

Does not always work for x11 panels.

See Also

Other Utility functions for plotting: addInterval; alphaPalette; color_contour; dotplot_error; emptyPlot; errorBars; fadeRug; fill_area; find_difference; getCoords; getFigCoords; gradientLegend; horiz_error; plot_error

Examples

Run this code
emptyPlot(100,100, h=50, v=50)
rect(25,25,75,75, col=alpha('red',f=1))
rect(35,41,63,81, col=alpha(rgb(0,1,.5),f=.25),
   border=alpha(rgb(0,1,.5), f=.65), lwd=4)

Run the code above in your browser using DataLab