Closed emhart closed 10 years ago
Code here
Niche.Overlap.Plot <- function (Data=matrix(rpois(80,1),nrow=5), Algorithm="RA3", Date.Stamp=date(), Plot.Output="screen") { opar<- par(no.readonly=TRUE) if (Plot.Output == "file") par(mfrow=c(2,1)) Data <- Data/rowSums(Data) plot(rep(1:ncol(Data),times = nrow(Data)), rep(1:nrow(Data),each=ncol(Data)), xlab="Resource Category",ylab="Species",cex=10*sqrt(t(Data)/pi),col="red3",lwd=2, main="Observed Utilization Matrix",col.main="red3",cex.main=1.5) if (Plot.Output=="file") mtext(as.character(Date.Stamp),side=3,adj=1,line=3) Fun.Alg <- get(Algorithm) One.Null.Matrix <- Fun.Alg(Data) One.Null.Matrix <- One.Null.Matrix/rowSums(One.Null.Matrix) plot(rep(1:ncol(One.Null.Matrix),times = nrow(One.Null.Matrix)), rep(1:nrow(One.Null.Matrix),each=ncol(One.Null.Matrix)), xlab="Resource Category",ylab="Species",cex=10*sqrt(t(One.Null.Matrix)/pi),col="royalblue3",lwd=2, main="Simulated Utilization Matrix",col.main="royalblue3",cex.main=1.5) par(opar) }
Code here