plbars {plgraphics} | R Documentation |
Add bars to a pl plot
Description
Adds horizontal or vertical bars to a plot
Usage
plbars(x = NULL, y = NULL, midpointwidth = NULL,
plargs = NULL, ploptions = NULL, marpar = NULL, ...)
Arguments
x , y |
coordinates for the horizontal and veritical axis,
respectively. Either of them must have 3 columns.
If |
midpointwidth |
for |
plargs , ploptions |
result of |
marpar |
margin parameters, if already available.
By default, they will be retieved from |
... |
absorbs extra arguments |
Details
For plbars
, the argument midpointwidth
determines the
length of the segments that mark the midpoint relative to the default,
which is proportional to the range of the plotting area and inversely
proportional to the number of (finite) observations.
plargs
and ploptions
may be specified explicitly.
Otherwise, they are taken from pl.envir
.
Value
None.
Author(s)
Werner A. Stahel
Examples
data(d.river)
dd <- plsubset(d.river, 1:2000)
da <- aggregate(dd[,3:7], dd[,"date",drop=FALSE], mean, na.rm=TRUE)
ds <- aggregate(dd[,3:7], dd[,"date",drop=FALSE], sd, na.rm=TRUE)
plyx(O2~date, data=da, type="n")
td <- da$O2 + outer(ds$O2, c(0,-1,1))
plbars(y = td, midpointwidth=0.1, bar.lwd=2)