Learn R Programming

itsadug (version 0.8)

fadeRug: Utility function.

Description

Add a transparency Rug to a contour plot or image.

Usage

fadeRug(x, y, n.grid = 30, gradual = FALSE, max.alpha = 0.75,
  col = "white")

Arguments

x
Observations on x-axis.
y
Observations on y-axis.
n.grid
Resolution of Rug. Defaults to 30, which means that the x- and y-axis are divided in 30 bins.
gradual
Logical: whether or not to use the number of observations in an area, i.e., more transparent equals more observations. Default is FALSE, which means that the function only distinguishes between observations in a certain region or not, regardless how many
max.alpha
Maximum of transparency, number between 0 (completely transparent) and 1 (non-transparent). Defaults to .75.
col
Color value. Defaults to "white".

Value

  • Plots a shaded image over the contour plot or image.

Warning

On Linux x11 devices may not support transparency. In that case, a solution might be to write the plots immediately to a file using functions such as pdf, or png.

See Also

rug, contour, image

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