errorbar: Display errorbars

View source: R/beginr.R

errorbarR Documentation

Display errorbars

Description

Create a errorbar, or add errorbars to an existing plot.

Usage

errorbar(x, y, xupper = NULL, xlower = NULL, yupper = NULL,
  ylower = NULL, col = "black", lty = 1)

Arguments

x, y

numeric vectors, the coordinates of points at which the error bar are to be plotted.

xupper, xlower

numeric vectors, error value of X axis, the X axis of error bars are from x - xlower to x + xupper.

yupper, ylower

numeric vectors, error value of Y axis, the Y axis of error bars are from y - ylower to y + yupper.

col, lty

graphical parameters, color and line type for the lines, more details see par.

Examples

x <- seq(0, 2 * pi, length.out = 100)
y <- sin(x)
plot(x, y, type = 'l')
errorbar(x, y, yupper = 0.1, ylower = 0.1)


pzhaonet/beginr documentation built on July 19, 2023, 1:57 p.m.