plbars | R Documentation |
Adds horizontal or vertical bars to a plot
plbars(x = NULL, y = NULL, midpointwidth = NULL,
plargs = NULL, ploptions = NULL, marpar = NULL, ...)
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 |
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
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.