| areaplot {heR.Misc} | R Documentation |
A function to fill in the area under the curve described by a set of x-y points with the specified color.
areaplot(x, y, col = "gray", new = FALSE, base=0, density=NULL, angle=NULL, ...)
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 |
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.
Invoked for producing a new plot or adding a filled polygon to the current plot.
Neil Klepeis