Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

error.bar

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

Geophysical Inverse Theory and Optimization

v2.2-3
GPL (>= 2)
Authors
Jonathan M. Lees [aut, cre]
Initial release
2020-08-28

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.