comparison insect_phenology_model.R @ 38:b81d2443b1b8 draft

Uploaded
author greg
date Thu, 09 Nov 2017 13:53:09 -0500
parents b0126627ade6
children e7bb2a00d30d
comparison
equal deleted inserted replaced
37:b0126627ade6 38:b81d2443b1b8
586 pdf(file=opt$output, height=20, width=20, bg="white") 586 pdf(file=opt$output, height=20, width=20, bg="white")
587 587
588 par(mar = c(5, 6, 4, 4), mfrow=c(3, 1)) 588 par(mar = c(5, 6, 4, 4), mfrow=c(3, 1))
589 589
590 # Subfigure 2: population size by life stage 590 # Subfigure 2: population size by life stage
591 title <- paste(opt$location, ",", start_date, "to", end_date, ": BSMB Total Population Size by Life Stage", sep=" ") 591 title <- paste(opt$location, start_date, "to", end_date, "BSMB Total Population Size by Life Stage", sep=" ")
592 plot(day.all, sa, main=title, type="l", ylim=c(0, max(se + se.se, sn + sn.se, sa + sa.se)), axes=F, lwd=2, xlab="", ylab="Number", cex=2, cex.lab=2, cex.axis=2, cex.main=2) 592 plot(day.all, sa, main=title, type="l", ylim=c(0, max(se + se.se, sn + sn.se, sa + sa.se)), axes=F, lwd=2, xlab="", ylab="Number", cex=2, cex.lab=2, cex.axis=2, cex.main=2)
593 # Young and old nymphs. 593 # Young and old nymphs.
594 lines(day.all, sn, lwd=2, lty=1, col=2) 594 lines(day.all, sn, lwd=2, lty=1, col=2)
595 # Eggs 595 # Eggs
596 lines(day.all, se, lwd=2, lty=1, col=4) 596 lines(day.all, se, lwd=2, lty=1, col=4)
610 lines (day.all, se + se.se, col=4, lty=2) 610 lines (day.all, se + se.se, col=4, lty=2)
611 lines (day.all, se - se.se, col=4, lty=2) 611 lines (day.all, se - se.se, col=4, lty=2)
612 } 612 }
613 613
614 # Subfigure 3: population size by generation 614 # Subfigure 3: population size by generation
615 title <- paste(opt$location, ",", start_date, "to", end_date, ": BSMB Total Population Size by Generation", sep=" ") 615 title <- paste(opt$location, start_date, "to", end_date, "BSMB Total Population Size by Generation", sep=" ")
616 plot(day.all, g0, main=title, type="l", ylim=c(0, max(g2)), axes=F, lwd=2, xlab="", ylab="Number", cex=2, cex.lab=2, cex.axis=2, cex.main=2) 616 plot(day.all, g0, main=title, type="l", ylim=c(0, max(g2)), axes=F, lwd=2, xlab="", ylab="Number", cex=2, cex.lab=2, cex.axis=2, cex.main=2)
617 lines(day.all, g1, lwd = 2, lty = 1, col = 2) 617 lines(day.all, g1, lwd = 2, lty = 1, col = 2)
618 lines(day.all, g2, lwd = 2, lty = 1, col = 4) 618 lines(day.all, g2, lwd = 2, lty = 1, col = 4)
619 axis(1, at = c(1:12) * 30 - 15, cex.axis = 2, labels = c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")) 619 axis(1, at = c(1:12) * 30 - 15, cex.axis = 2, labels = c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"))
620 axis(2, cex.axis = 2) 620 axis(2, cex.axis = 2)
632 lines (day.all, g2 + g2.se, col = 4, lty = 2) 632 lines (day.all, g2 + g2.se, col = 4, lty = 2)
633 lines (day.all, g2 - g2.se, col = 4, lty = 2) 633 lines (day.all, g2 - g2.se, col = 4, lty = 2)
634 } 634 }
635 635
636 # Subfigure 4: adult population size by generation 636 # Subfigure 4: adult population size by generation
637 title <- paste(opt$location, ",", start_date, "to", end_date, ": BSMB Adult Population Size by Generation", sep=" ") 637 title <- paste(opt$location, start_date, "to", end_date, "BSMB Adult Population Size by Generation", sep=" ")
638 plot(day.all, g0a, ylim=c(0, max(g2a) + 100), main=title, type="l", axes=F, lwd=2, xlab="Year", ylab="Number", cex=2, cex.lab=2, cex.axis=2, cex.main=2) 638 plot(day.all, g0a, ylim=c(0, max(g2a) + 100), main=title, type="l", axes=F, lwd=2, xlab="Year", ylab="Number", cex=2, cex.lab=2, cex.axis=2, cex.main=2)
639 lines(day.all, g1a, lwd = 2, lty = 1, col = 2) 639 lines(day.all, g1a, lwd = 2, lty = 1, col = 2)
640 lines(day.all, g2a, lwd = 2, lty = 1, col = 4) 640 lines(day.all, g2a, lwd = 2, lty = 1, col = 4)
641 axis(1, at = c(1:12) * 30 - 15, cex.axis = 2, labels = c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")) 641 axis(1, at = c(1:12) * 30 - 15, cex.axis = 2, labels = c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"))
642 axis(2, cex.axis = 2) 642 axis(2, cex.axis = 2)