model <- function(t, state, parms) {
  with(as.list(c(state,parms)), {
    dN1 <- i + r1*N1*(1 - N1 - A12*N2)
    dN2 <- i + r2*N2*(1 - N2 - A21*N1)
    return(list(c(dN1, dN2)))  
  }) 
}  

p <- c(r1=2,r2=1,A12=0.5,A21=0.5,i=0)
s <- c(N1=0.0,N2=0.01)
plane(xmax=1.6,ymax=1.6,legend=FALSE,portrait=TRUE,grid=3,tstep=0.1)

# Make Figures
# size<-5#inch
# pdf("LVcompA.pdf",width=size,height=size)
# par(mar=c(0.1,0.1,0.1,0.1),xaxt="n",yaxt="n",ann=F,xaxs="i",yaxs="i")
# p["A12"] <- 3/2
# p["A21"] <- 2/3
# plane(xmax=1.6,ymax=1.6,legend=FALSE,portrait=TRUE,grid=3,tstep=0.1)
# dev.off()
# 
# pdf("LVcompB.pdf",width=size,height=size)
# par(mar=c(0.1,0.1,0.1,0.1),xaxt="n",yaxt="n",ann=F,xaxs="i",yaxs="i")
# p["A12"] <- 2/3
# p["A21"] <- 3/2
# plane(xmax=1.6,ymax=1.6,legend=FALSE,portrait=TRUE,grid=3,tstep=0.1)
# dev.off()
# 
# 
# pdf("LVcompC.pdf",width=size,height=size)
# par(mar=c(0.1,0.1,0.1,0.1),xaxt="n",yaxt="n",ann=F,xaxs="i",yaxs="i")
# p["A12"] <- 3/2
# p["A21"] <- 3/2
# plane(xmax=1.6,ymax=1.6,legend=FALSE,portrait=TRUE,grid=3,tstep=0.1)
# dev.off()
# 
# pdf("LVcompD.pdf",width=size,height=size)
# par(mar=c(0.1,0.1,0.1,0.1),xaxt="n",yaxt="n",ann=F,xaxs="i",yaxs="i")
# p["A12"] <- 2/3
# p["A21"] <- 2/3
# plane(xmax=1.6,ymax=1.6,legend=FALSE,portrait=TRUE,grid=3,tstep=0.1)
# dev.off()
# 
# p["i"] <- 0.02
# pdf("LVcomp2A.pdf",width=size,height=size)
# par(mar=c(0.1,0.1,0.1,0.1),xaxt="n",yaxt="n",ann=F,xaxs="i",yaxs="i")
# p["A12"] <- 3/2
# p["A21"] <- 2/3
# plane(xmax=1.6,ymax=1.6,legend=FALSE)
# dev.off()
# 
# pdf("LVcomp2B.pdf",width=size,height=size)
# par(mar=c(0.1,0.1,0.1,0.1),xaxt="n",yaxt="n",ann=F,xaxs="i",yaxs="i")
# p["A12"] <- 2/3
# p["A21"] <- 3/2
# plane(xmax=1.6,ymax=1.6,legend=FALSE)
# dev.off()
# 
# pdf("LVcomp2C.pdf",width=size,height=size)
# par(mar=c(0.1,0.1,0.1,0.1),xaxt="n",yaxt="n",ann=F,xaxs="i",yaxs="i")
# p["A12"] <- 3/2
# p["A21"] <- 3/2
# plane(xmax=1.6,ymax=1.6,legend=FALSE)
# dev.off()
# 
# pdf("LVcomp2D.pdf",width=size,height=size)
# par(mar=c(0.1,0.1,0.1,0.1),xaxt="n",yaxt="n",ann=F,xaxs="i",yaxs="i")
# p["A12"] <- 2/3
# p["A21"] <- 2/3
# plane(xmax=1.6,ymax=1.6,legend=FALSE)
# dev.off()

