Mercurial > repos > greg > insect_phenology_model
comparison insect_phenology_model.R @ 41:758c6e5f29a9 draft
Uploaded
author | greg |
---|---|
date | Thu, 09 Nov 2017 14:05:36 -0500 |
parents | ece79df73287 |
children | 5260db6479db |
comparison
equal
deleted
inserted
replaced
40:ece79df73287 | 41:758c6e5f29a9 |
---|---|
584 pdf(file=opt$output, height=20, width=20, bg="white") | 584 pdf(file=opt$output, height=20, width=20, bg="white") |
585 | 585 |
586 par(mar = c(5, 6, 4, 4), mfrow=c(3, 1)) | 586 par(mar = c(5, 6, 4, 4), mfrow=c(3, 1)) |
587 | 587 |
588 # Subfigure 2: population size by life stage | 588 # Subfigure 2: population size by life stage |
589 title <- paste("BSMB Total Population Size by Life Stage:", opt$location, ", "Latitude:", latitude, ", Temperature Dates:", start_date, "to", end_date, sep=" ") | 589 title <- paste("BSMB Total Population Size by Life Stage:", opt$location, ", Latitude:", latitude, ", Temperature Dates:", start_date, "to", end_date, sep=" ") |
590 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) | 590 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) |
591 # Young and old nymphs. | 591 # Young and old nymphs. |
592 lines(day.all, sn, lwd=2, lty=1, col=2) | 592 lines(day.all, sn, lwd=2, lty=1, col=2) |
593 # Eggs | 593 # Eggs |
594 lines(day.all, se, lwd=2, lty=1, col=4) | 594 lines(day.all, se, lwd=2, lty=1, col=4) |
608 lines (day.all, se + se.se, col=4, lty=2) | 608 lines (day.all, se + se.se, col=4, lty=2) |
609 lines (day.all, se - se.se, col=4, lty=2) | 609 lines (day.all, se - se.se, col=4, lty=2) |
610 } | 610 } |
611 | 611 |
612 # Subfigure 3: population size by generation | 612 # Subfigure 3: population size by generation |
613 title <- paste("BSMB Total Population Size by Generation:", opt$location, "Latitude:", latitude, Temperature Dates:", start_date, "to", end_date, sep=" ") | 613 title <- paste("BSMB Total Population Size by Generation:", opt$location, ", Latitude:", latitude, ", Temperature Dates:", start_date, "to", end_date, sep=" ") |
614 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) | 614 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) |
615 lines(day.all, g1, lwd = 2, lty = 1, col = 2) | 615 lines(day.all, g1, lwd = 2, lty = 1, col = 2) |
616 lines(day.all, g2, lwd = 2, lty = 1, col = 4) | 616 lines(day.all, g2, lwd = 2, lty = 1, col = 4) |
617 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")) | 617 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")) |
618 axis(2, cex.axis = 2) | 618 axis(2, cex.axis = 2) |
630 lines (day.all, g2 + g2.se, col = 4, lty = 2) | 630 lines (day.all, g2 + g2.se, col = 4, lty = 2) |
631 lines (day.all, g2 - g2.se, col = 4, lty = 2) | 631 lines (day.all, g2 - g2.se, col = 4, lty = 2) |
632 } | 632 } |
633 | 633 |
634 # Subfigure 4: adult population size by generation | 634 # Subfigure 4: adult population size by generation |
635 title <- paste("BSMB Adult Population Size by Generation:", opt$location, "Latitude:", latitude, Temperature Dates:", start_date, "to", end_date, sep=" ") | 635 title <- paste("BSMB Adult Population Size by Generation:", opt$location, ", Latitude:", latitude, ", Temperature Dates:", start_date, "to", end_date, sep=" ") |
636 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) | 636 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) |
637 lines(day.all, g1a, lwd = 2, lty = 1, col = 2) | 637 lines(day.all, g1a, lwd = 2, lty = 1, col = 2) |
638 lines(day.all, g2a, lwd = 2, lty = 1, col = 4) | 638 lines(day.all, g2a, lwd = 2, lty = 1, col = 4) |
639 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")) | 639 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")) |
640 axis(2, cex.axis = 2) | 640 axis(2, cex.axis = 2) |