addErrorBars {DMCfun}R Documentation

addErrorBars: Add errorbars to plot.

Description

Add error bars to current plot (uses base arrows function).

Usage

addErrorBars(xpos, ypos, errorSize, arrowSize = 0.1)

Arguments

xpos

x-position of data-points

ypos

y-position of data-points

errorSize

+- size of error bars

arrowSize

Width of the errorbar arrow

Value

Plot (no return value)

Examples

# Example 1
plot(c(1, 2), c(450, 500), xlim = c(0.5, 2.5), ylim = c(400, 600), type = "o")
addErrorBars(c(1, 2), c(450, 500), errorSize = c(20, 20))

# Example 2
plot(c(1, 2), c(450, 500), xlim = c(0.5, 2.5), ylim = c(400, 600), type = "o")
addErrorBars(c(1, 2), c(450, 500), errorSize = c(20, 40), arrowSize = 0.1)


[Package DMCfun version 2.0.2 Index]