Learn R Programming

itsadug (version 2.0)

alpha: Adjusting the transparency of colors.

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 Functions for plotting: addInterval, add_bars, alphaPalette, check_normaldist, color_contour, dotplot_error, drawArrows, emptyPlot, errorBars, fadeRug, fill_area, getCoords, getFigCoords, getProps, gradientLegend, marginDensityPlot, plot_error, plot_image, plotsurface, rug_model

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