plbars {plgraphics} | R Documentation |
Adds horizontal or vertical bars to a plot
plbars(x = NULL, y = NULL, midpointwidth = NULL, plargs = NULL, ploptions = NULL, getpar = TRUE, ...)
x, y |
coordinates for the horizontal and veritical axis,
respectively. Either of them must have 3 columns.
If |
midpointwidth |
for |
plargs, ploptions |
result of |
getpar |
logical: should graphical parameters
|
... |
absorbs extra arguments |
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 .plargs
.
The argument getpar
is used for setting the graphical
parameters cex, mar, mgp
according to ploptions
.
This is needed if the high level pl function has changed mar
,
since this change has been reversed when the function was left.
By default, these graphical parameters will be retieved from
.plargs$ploptions
.
None.
Werner A. Stahel
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)