error.bar: Plot Error Bar

View source: R/error.bar.R

error.barR Documentation

Plot Error Bar

Description

Plot Error Bar

Usage

error.bar(x, y, lo, hi, pch = 1, col = 1, barw = 0.1, add = FALSE, ...)

Arguments

x

X-values

y

Y-values

lo

Lower limit of error bars

hi

Upper limit of error bars

pch

plotting character

col

color

barw

width of the bar

add

logical, add=FALSE starts a new plot

...

other plotting parameters

Value

graphical side effects

Author(s)

Jonathan M. Lees<jonathan.lees@unc.edu>

Examples

x = 1:10
y = 2*x+5
zup = rnorm(10)


zup = zup-min(zup)+.5
zdown = rnorm(10)
zdown = zdown-min(zdown)+.2


####  example with same error on either side:
error.bar(x, y, y-zup, y+zup, pch = 1, col = 'brown' , barw = 0.1, add =
FALSE)


####  example with different  error on either side:
error.bar(x, y, y-zdown, y+zup, pch = 1, col = 'brown' , barw = 0.1, add
= FALSE)





PEIP documentation built on Aug. 21, 2023, 9:10 a.m.