plotTrace {PBSmodelling}R Documentation

Plot Trace Lines from a Data Frame, Matrix, or Vector

Description

Plot trace lines from a data frame or matrix where the first field contains x-values, and subsequent fields give y-values to be traced over x. If input is a vector, this is traced over the number of observations.

Usage

plotTrace(file, clrs=c("blue","red","green","magenta","navy"), ...)

Arguments

file data frame or matrix of x and y-values, or a vector of y-values.
clrs vector of colours. Patterns are repeated if the number of traces (y-fields) exceeed the length of clrs.
... additional arguments for plot or lines.

Details

This function is designed primarily to give greater flexibility when viewing results from the R-package BRugs. Use plotTrace in conjuction with samplesHistory("*",beg=0,plot=FALSE) rather than samplesHistory which calls plotHistory.

Examples

z <- data.frame(x=1:50,y1=rnorm(50,sd=3),y2=rnorm(50,sd=1),y3=rnorm(50,sd=.25))
plotTrace(z,lwd=3)

[Package PBSmodelling version 2.06 Index]