Topic: CTFS Plot Maps

Topic Description:

Functions for maps of CTFS plot data. The file map.r has functions for tree distribution maps, including overlays of elevation contours. The file mapresponse.r has functions for creating color or contour maps of any numerical responses, based on the R functions image, contour, and filled.contour.



File: map/map.r

View File Source Download File No help file available

Function: pdf.allplot

Function Description: pdf.allplot

Export a pdf with one or more species maps. If singlefile=TRUE, all maps will be in one big pdf, otherwise, a pdf for every species is created. The file exported will be named with Map.pdf in the path name given.
This calls the map() function for all species in the splitdata list; it is designed for all species from a plot (default is all species from the BCI plot). See description of map() for details.

Function Arguments:

ArgumentDefault Value
splitdatabci.split6
spplistbci.spptable
elevctfs.elev$bci$mat
plotdimc(1000,500)
cutoffc(10,100,300,3000)
topoint2
bwFALSE
topoclr'gray80'
bty'o'
plotside9
h8
w10
sizec(.3,.45,.65)
deadtreeFALSE
symbolsNULL
legsize0.75
legposc(plotdim[1]/2,1.16*plotdim[2])
exportTRUE
singlefileTRUE
path'/home/condit/data/maps/bci/'

Function Source:


pdf.allplot=function(splitdata=bci.split6,spplist=bci.spptable,elev=ctfs.elev$bci$mat,plotdim=c(1000
        ,500),cutoff=c(10,100,300,3000),topoint=2,bw=FALSE,
topoclr='gray80',bty='o',plotside=9,h=8,w=10,size=c(.3,.45,.65),deadtree=FALSE,
        symbols=NULL,legsize=0.75,legpos=c(plotdim[1]/2,1.16*plotdim[2]), export=TRUE,singlefile=TRUE,path='/home/condit/data/maps/bci/')
{
on.exit(graphics.off())
if(singlefile) pdf(file=pst(path,'allsppMap.pdf'),width=w,height=h)

allspp=names(splitdata)
for(i in 1:length(allspp))
{
if(!singlefile & export) pdf(file=pst(path,allspp[i],'Map.pdf'),width=10,height=8)

map(splitdata,species=allspp[i],spplist=spplist,elevdata=elev,plotdim=plotdim,cutoff=cutoff,size=
        size,deadtree=deadtree,bw=bw,topoclr=topoclr,
bty=bty,symbols=symbols,legsize=legsize,legpos=legpos,plotside=plotside,topoint=topoint,expor
        t="no") if(!singlefile & export) graphics.off()
}
}