Error Bars in X and Y

Description

Error Bars in X and Y

Usage

1
2
XYerror.bars(x, y, xlo = 0, xhi = 0, ylo = 0,
yhi = 0, pch = 1, col = 1, barw = 0.1, add = FALSE, ...)

Arguments

x

X-values

y

Y-values

xlo

X Lower limit of error bars

xhi

X Upper limit of error bars

ylo

Y Lower limit of error bars

yhi

Y Upper limit of error bars

pch

plotting character

col

color

barw

width of the bar (inches)

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
set.seed(0)
zup = rnorm(10)

x = 1:10
y = 2*x+5+zup

ydown = rnorm(10)
ydown = ydown-min(ydown)+.2

yup = rnorm(10)
yup = yup-min(yup)+.2



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


####  example with different  error on either side:
XYerror.bars(x, y, y-ydown, y+yup, x-xdown, x+xup,
 pch = 1, col = 'brown' , barw = 0.1, add
= FALSE)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.