R/visualize-sp.R

Defines functions visualize.sp

Documented in visualize.sp

# To draw the sample paths
visualize.sp <- function(data,epsilon=0.05,nb.sp=10,plotfunc=plot,...) {
  
  limit <- max(abs(data[1:nb.sp,]))
  nmax <- ncol(data)
  plotfunc(data[1,],type="l",xlab="n",ylim=c(-limit,limit),ylab='',lwd=1,pch=46,...)
  mtext(bquote(bold("+" ~ epsilon)),side=2,line=2.5,xpd=TRUE,col="blue",at=epsilon,las=1)
  mtext(bquote(bold("-" ~ epsilon)),side=2,line=2.5,xpd=TRUE,col="blue",at=-epsilon,las=1)
  apply(data[1:nb.sp,],MARGIN=1,FUN=points,lwd=1,type="l",pch=46,...)
  abline(h=epsilon,col="blue")
  abline(h=-epsilon,col="blue")
  
  
}

Try the ConvergenceConcepts package in your browser

Any scripts or data that you put into this service are public.

ConvergenceConcepts documentation built on May 29, 2017, 11:03 p.m.