plotTrace | R Documentation |
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.
plotTrace(file, clrs=c("blue","red","green","magenta","navy"), ...)
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) exceed the length of |
... |
additional arguments for |
This function is designed primarily to give greater flexibility when viewing
results from the R-package BRugs
. Use plotTrace
in conjunction with
samplesHistory("*",beg=0,plot=FALSE)
rather than samplesHistory
which calls plotHistory
.
Rowan Haigh, Pacific Biological Station, Fisheries and Oceans Canada, Nanaimo BC
local(envir=.PBSmodEnv,expr={
oldpar = par(no.readonly=TRUE)
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)
par(oldpar)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.