Skip to content

Instantly share code, notes, and snippets.

@darmitage
Created November 1, 2011 21:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darmitage/1331886 to your computer and use it in GitHub Desktop.
Save darmitage/1331886 to your computer and use it in GitHub Desktop.
Bipartite network Code
#This code uses a community matrix a'la VEGAN to make a bipartite network of how your taxa are organized into a particular habitat#
#Gets really messy with >100 species#
samp <- samp[c(4,10,1,11,12),]
require(bipartite)
visweb(samp, type="nested", prednames=TRUE, preynames=TRUE, labsize=1,
plotsize=12, square="black", text="no", frame=NULL, textsize=1,
textcol="red", pred.lablength=NULL, prey.lablength = NULL, clear=TRUE,
xlabel="", ylabel="", boxes=TRUE, circles=FALSE, circle.col="black",
circle.min=0.2, circle.max=2, outerbox.border="white",
outerbox.col="white", box.border="black", box.col="black")
plotweb(samp, method = "cca", empty = TRUE, labsize = 1.25, ybig = 1,
y.width.low = 0.1, y.width.high = 0.1, low.spacing = NULL,
high.spacing = NULL, arrow = "no", col.interaction = "grey80",
col.high = "darkgreen", col.low = color, bor.col.interaction = "black",
bor.col.high = "black", bor.col.low = "black", high.lablength = NULL,
low.lablength = NULL, sequence = NULL, low.abun = NULL, low.abun.col = "green",
bor.low.abun.col = "black", high.abun = NULL, high.abun.col = "red",
bor.high.abun.col = "black", text.rot = 0, text.high.col = "black",
text.low.col = "black", ad.high = NULL, ad.low = NULL, plot.axes = FALSE,
low.y = 0.5, high.y = 1.5, add = FALSE, y.lim = NULL, x.lim = NULL,
low.plot = TRUE, high.plot = TRUE, high.xoff = 0, low.xoff = 0,
high.lab.dis = NULL, low.lab.dis = NULL)
color = c("darkolivegreen2", "palevioletred1","burlywood3","ivory3","ivory4")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment