Learn R Programming

phenology (version 3.49)

plot_errbar: Plot a xy graph with error bar on x and/or y

Description

To plot data, just add use it as a normal plot but add the errbar.x and errbar.y values.

Usage

plot_errbar(..., errbar.x = NULL, errbar.y = NULL,
    errbar.x.plus = NULL, errbar.x.minus = NULL,
    errbar.y.plus = NULL, errbar.y.minus = NULL,
    errbar.tick = 1/50, errbar.lwd = par("lwd"),
    errbar.lty = par("lty"), errbar.col = par("fg"))

Arguments

...
Parameters for plot() such as main= or ylim=
errbar.x
The length of error bars for x. Recycled if necessary.
errbar.x.plus
The length of positive error bars for x. Recycled if necessary.
errbar.x.minus
The length of negative error bars for x. Recycled if necessary.
errbar.y
The length of error bars for y. Recycled if necessary.
errbar.y.plus
The length of positive error bars for y. Recycled if necessary.
errbar.y.minus
The length of negative error bars for y. Recycled if necessary.
errbar.tick
Size of small ticks at the end of error bars defined as a proportion of total width or height graph size.
errbar.lwd
Error bar line width, see par("lwd")
errbar.lty
Error bar line type, see par("lwd")
errbar.col
Error bar line color, see par("col")

Value

  • Nothing

Details

plot_errbar plot a xy graph with error bar on x and/or y

Examples

Run this code
plot_errbar(1:100, rnorm(100, 1, 2),
		xlab="axe x", ylab="axe y", bty="n", xlim=c(1,100),
		errbar.x=2, errbar.y=rnorm(100, 1, 0.1))

Run the code above in your browser using DataLab