# NOT RUN {
data(Safariland)
plotweb(Safariland)
# shorter labels
plotweb(Safariland, high.lablength=3, low.lablength=0, arrow="down")
# centered triangles for displaying interacions
plotweb(Safariland, text.rot=90, arrow="down.center", col.interaction="wheat2",
y.lim=c(-1,2.5))
#orginal sequence, up arrows and different box width
plotweb(Safariland, method="normal", arrow="up", y.width.low=0.3, low.lablength=4)
# interactions as lines
plotweb(Safariland, arrow="both", y.width.low=0.05, text.rot=90, col.high="blue",
col.low="green")
# add an abundance vector for lower trophic species
low.abun = round(runif(dim(Safariland)[1],1,40)) #create
names(low.abun) <- rownames(Safariland)
plotweb(Safariland, text.rot=90, low.abun=low.abun, col.interaction="purple",
y.width.low=0.05, y.width.high=0.05)
plotweb(Safariland, text.rot=90, low.abun=low.abun, col.interaction ="red",
bor.col.interaction="red", arrow="down")
# now vectors for all colours can be given, to mark certain species or
# interactions. Colour vectors are recycled if not of appropriate length
plotweb(Safariland,col.high=c("orange","green"))
plotweb(Safariland,col.low=c("orange","green"),col.high=c("white","grey","purple"),
text.high.col=c("blue","red"), col.interaction=c("red",rep("green",26),rep("brown",242)),
bor.col.interaction=c(rep("green",26),rep("brown",242)),method="normal",
text.rot=90, low.lablength=10, high.lablength=5)
#example one (tritrophic)
plotweb(Safariland,y.width.low=0.1, y.width.high=0.05,method="normal",
y.lim=c(0,3), arrow="up", adj.high=c(0.5,1.5), col.high="orange",
high.lablength=3,high.lab.dis=0)
plotweb(t(Safariland), y.width.low=0.05, y.width.high=0.1, method="normal",
add=TRUE,low.y=1.5,high.y=2.5, col.low="green", text.low.col="red",
low.lab.dis=0, arrow="down", adj.low=c(0.5,1.1),low.plot=FALSE)
#example two (4 trophic with abundance)
low.abun = round(runif(dim(Safariland)[1],1,40)) #create
names(low.abun) <- rownames(Safariland)
plotweb(Safariland, text.rot=90, high.abun=low.abun, col.interaction="purple",
y.lim=c(0,4.5), high.lablength=0, arrow="up", method="normal",
y.width.high=0.05)
plotweb(t(Safariland), y.width.low=0.05, y.width.high=0.1, method="normal",
add=TRUE, low.y=1.7,high.y=2.7, col.low="green", text.low.col="black",
low.lab.dis=0, arrow="down", adj.low=c(0.5,1.1), low.lablength=4,
high.lablength=0)
plotweb(Safariland,y.width.low=0.05, y.width.high=0.1, method="normal",
add=TRUE, low.y=2.95, high.y=3.95, col.low="green", text.low.col="black",
low.lab.dis=0, arrow="down", adj.low=c(0.5,1.1), low.lablength=4)
# now some examples with the abuns.type-option:
plotweb(Safariland, abuns.type='independent',arrow="down.center")
plotweb(Safariland, abuns.type='additional',arrow="down.center")
# }
Run the code above in your browser using DataLab