comparison insect_phenology_model.R @ 88:b387ea636ff8 draft

Uploaded
author greg
date Wed, 22 Nov 2017 13:18:49 -0500
parents 522fe34a1dfc
children 7433448e313d
comparison
equal deleted inserted replaced
87:522fe34a1dfc 88:b387ea636ff8
574 pdf(file=opt$output, width=20, height=30, bg="white") 574 pdf(file=opt$output, width=20, height=30, bg="white")
575 575
576 par(mar = c(5, 6, 4, 4), mfrow=c(3, 1)) 576 par(mar = c(5, 6, 4, 4), mfrow=c(3, 1))
577 577
578 # Subfigure 1: population size by life stage 578 # Subfigure 1: population size by life stage
579 title <- paste("opt$insect : Total pop. by life stage :", opt$location, ": Lat:", latitude, ":", start_date, "-", end_date, sep=" ") 579 title <- paste(opt$insect, ": Total pop. by life stage :", opt$location, ": Lat:", latitude, ":", start_date, "-", end_date, sep=" ")
580 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="", cex=3, cex.lab=3, cex.axis=3, cex.main=3) 580 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="", cex=3, cex.lab=3, cex.axis=3, cex.main=3)
581 # Young and old nymphs. 581 # Young and old nymphs.
582 lines(day.all, sn, lwd=2, lty=1, col=2) 582 lines(day.all, sn, lwd=2, lty=1, col=2)
583 # Eggs 583 # Eggs
584 lines(day.all, se, lwd=2, lty=1, col=4) 584 lines(day.all, se, lwd=2, lty=1, col=4)
598 lines (day.all, se + se.se, col=4, lty=2) 598 lines (day.all, se + se.se, col=4, lty=2)
599 lines (day.all, se - se.se, col=4, lty=2) 599 lines (day.all, se - se.se, col=4, lty=2)
600 } 600 }
601 601
602 # Subfigure 2: population size by generation 602 # Subfigure 2: population size by generation
603 title <- paste("opt$insect : Total pop. by generation :", opt$location, ": Lat:", latitude, ":", start_date, "-", end_date, sep=" ") 603 title <- paste(opt$insect, ": Total pop. by generation :", opt$location, ": Lat:", latitude, ":", start_date, "-", end_date, sep=" ")
604 plot(day.all, g0, main=title, type="l", ylim=c(0, max(g2)), axes=F, lwd=2, xlab="", ylab="", cex=3, cex.lab=3, cex.axis=3, cex.main=3) 604 plot(day.all, g0, main=title, type="l", ylim=c(0, max(g2)), axes=F, lwd=2, xlab="", ylab="", cex=3, cex.lab=3, cex.axis=3, cex.main=3)
605 lines(day.all, g1, lwd = 2, lty = 1, col=2) 605 lines(day.all, g1, lwd = 2, lty = 1, col=2)
606 lines(day.all, g2, lwd = 2, lty = 1, col=4) 606 lines(day.all, g2, lwd = 2, lty = 1, col=4)
607 axis(1, at=c(1:12) * 30 - 15, cex.axis=3, labels = c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")) 607 axis(1, at=c(1:12) * 30 - 15, cex.axis=3, labels = c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"))
608 axis(2, cex.axis=3) 608 axis(2, cex.axis=3)
620 lines (day.all, g2+g2.se, col=4, lty=2) 620 lines (day.all, g2+g2.se, col=4, lty=2)
621 lines (day.all, g2-g2.se, col=4, lty=2) 621 lines (day.all, g2-g2.se, col=4, lty=2)
622 } 622 }
623 623
624 # Subfigure 3: adult population size by generation 624 # Subfigure 3: adult population size by generation
625 title <- paste("opt$insect : Adult pop. by generation :", opt$location, ": Lat:", latitude, ":", start_date, "-", end_date, sep=" ") 625 title <- paste(opt$insect, ": Adult pop. by generation :", opt$location, ": Lat:", latitude, ":", start_date, "-", end_date, sep=" ")
626 plot(day.all, g0a, ylim=c(0, max(g2a) + 100), main=title, type="l", axes=F, lwd=2, xlab="", ylab="", cex=3, cex.lab=3, cex.axis=3, cex.main=3) 626 plot(day.all, g0a, ylim=c(0, max(g2a) + 100), main=title, type="l", axes=F, lwd=2, xlab="", ylab="", cex=3, cex.lab=3, cex.axis=3, cex.main=3)
627 lines(day.all, g1a, lwd = 2, lty = 1, col=2) 627 lines(day.all, g1a, lwd = 2, lty = 1, col=2)
628 lines(day.all, g2a, lwd = 2, lty = 1, col=4) 628 lines(day.all, g2a, lwd = 2, lty = 1, col=4)
629 axis(1, at=c(1:12) * 30 - 15, cex.axis=3, labels = c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")) 629 axis(1, at=c(1:12) * 30 - 15, cex.axis=3, labels = c("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"))
630 axis(2, cex.axis=3) 630 axis(2, cex.axis=3)