Learn R Programming

oce (version 0.9-18)

errorbars: Draw error bars on an existing xy diagram

Description

Draw error bars on an existing xy diagram

Usage

errorbars(x, y, xe, ye, percent=FALSE, style=0, length=0.025, ...)

Arguments

x
x coordinates of points on the existing plot.
y
y coordinates of points on the existing plot.
xe
error on x coordinates of points on the existing plot, either a single number or a vector of length identical to that of y.
ye
as xe but for y coordinate.
percent
boolean flag indicating whether xe and ye are in terms of percent of the corresponding x and y values.
style
indication of the style of error bar. Using style=0 yields simple line segments (drawn with segments) and style=1 yields line segments with short perpendicular endcaps.
length
length of endcaps, for style=1 only; it is passed to arrows, which is used to draw that style of error bars.
...
graphical parameters passed to the code that produces the error bars, e.g. to segments for style=0.

Examples

Run this code
library(oce)
data(ctd)
S <- ctd[["salinity"]]
T <- ctd[["temperature"]]
plot(S, T)
errorbars(S, T, 0.05, 0.5)

Run the code above in your browser using DataLab