| 1 |
\name{errbar} |
| 2 |
\title{Scatter Plot with Error Bars} |
| 3 |
\alias{errbar} |
| 4 |
\description{ |
| 5 |
Draws a scatter plot, adding vertical \dQuote{error bars} to all the points. |
| 6 |
} |
| 7 |
\usage{ |
| 8 |
errbar(x, y, yplus, yminus, cap = 0.015, |
| 9 |
ylim = range(y,yplus,yminus), |
| 10 |
xlab= deparse(substitute(x)), |
| 11 |
ylab= deparse(substitute(y)), \dots) |
| 12 |
} |
| 13 |
\arguments{ |
| 14 |
\item{x}{vector of x values.} |
| 15 |
\item{y}{vector of y values.} |
| 16 |
\item{yplus}{vector of y values: the tops of the error bars.} |
| 17 |
\item{yminus}{vector of y values: the bottoms of the error bars.} |
| 18 |
\item{cap}{the width of the little lines at the tops and bottoms of |
| 19 |
the error bars in units of the width of the plot. Default is 0.015.} |
| 20 |
\item{ylim}{(numeric of length 2): the y-axis extents with a sensible default.} |
| 21 |
\item{xlab, ylab}{axis labels for the plot, as in |
| 22 |
\code{\link{plot.default}}.} |
| 23 |
\item{\dots}{Graphical parameters (see \code{\link{par}}) may also |
| 24 |
be supplied as arguments to this function.} |
| 25 |
} |
| 26 |
\author{Originally Charles Geyer, U.Chicago, early 1991; then Martin Mächler.} |
| 27 |
\seealso{\code{\link[Hmisc]{errbar}} in package \CRANpkg{Hmisc} is similar. |
| 28 |
%% maybe deprecate ours? FIXME |
| 29 |
} |
| 30 |
\examples{ |
| 31 |
y <- rnorm(10); d <- 1 + .1*rnorm(10) |
| 32 |
errbar(1:10, y, y + d, y - d, main="Error Bars example") |
| 33 |
} |
| 34 |
\keyword{hplot} |