areaplot {heR.Misc}R Documentation

Draw Area Under a Curve

Description

A function to fill in the area under the curve described by a set of x-y points with the specified color.

Usage

areaplot(x, y, col = "gray", new = FALSE, base=0, density=NULL, angle=NULL,  ...)

Arguments

x a vector of x values
y as vector of y values
col the color to use for filling in the area under the curve
new logical, whether to create a new plot or not
base baseline y value, defaulting to zero
density density of fill lines
angle angle of fill lines
... additional arguments to the polygon function

Details

This function would normally be used on an existing plot to fill in the "area under a curve." It is intended to be used on linear axes, but might work on logarithmic scales.

We add points with a baseline of base y-values (defaulting to zero) at the beginning and end to ensure that the area is drawn to the baseline. The fill is drawn to the minimum y point or base, whichever is lower.

Value

Invoked for producing a new plot or adding a filled polygon to the current plot.

Author(s)

Neil Klepeis

See Also

polygon


[Package heR.Misc version 0.0.4 Index]