Learn R Programming

Momocs (version 0.1-03)

Utilities: dev.plot: Calculates and plots series with associated error bars.

Description

This function is used internally by methods based on deviations for one one many outlines. Yet, it provides a quick way to create plots of series, possibly with deviations, from scratch.

Usage

dev.plot(mat, matv, cols, x = 1:ncol(mat), bw = 0.1)

Arguments

mat
A matrix containing one or many lines (as individuals) with the corresponding y values (as cols).
matv
A matrix of the same dimension as mat but containing the deviation from the mat matrix.
cols
A vector of ncol(mat) colors.
x
integer. The range on which to plot.
bw
numeric. The width of the errors bars to draw.

Examples

Run this code
foo.m <- matrix(1:10, nr=10, nc=10, byrow=TRUE) + rnorm(100, sd=0.2)
plot(NA, xlim=range(foo.m), ylim=range(foo.m))
dev.plot(foo.m, foo.m*0.1, col.sari(10))

Run the code above in your browser using DataLab