changeset 54:5115076f136c draft

Uploaded
author greg
date Mon, 13 Nov 2017 11:44:38 -0500
parents 9dc9dc41851b
children c24b519ad05e
files insect_phenology_model.R
diffstat 1 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/insect_phenology_model.R	Mon Nov 13 11:30:28 2017 -0500
+++ b/insect_phenology_model.R	Mon Nov 13 11:44:38 2017 -0500
@@ -586,15 +586,15 @@
 
 par(mar = c(5, 6, 4, 4), mfrow=c(3, 1))
 
-# Subfigure 2: population size by life stage
-title <- paste("BSMB Total Population Size by Life Stage |", opt$location, "| Lat:", latitude, "|", start_date, "to", end_date, sep=" ")
-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=3, cex.lab=3, cex.axis=3, cex.main=3)
+# Subfigure 1: population size by life stage
+title <- paste("BSMB total population by life stage :", opt$location, ": Lat:", latitude, ":", start_date, "to", end_date, sep=" ")
+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="total population", cex=3, cex.lab=3, cex.axis=3, cex.main=3)
 # Young and old nymphs.
 lines(day.all, sn, lwd=2, lty=1, col=2)
 # Eggs
 lines(day.all, se, lwd=2, lty=1, col=4)
-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"))
-axis(2, cex.axis = 3)
+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"))
+axis(2, cex.axis=3)
 leg.text <- c("Egg", "Nymph", "Adult")
 legend("topleft", leg.text, lty=c(1, 1, 1), col=c(4, 2, 1), cex=3)
 if (opt$se_plot == 1) {
@@ -610,15 +610,15 @@
     lines (day.all, se - se.se, col=4, lty=2)
 }
 
-# Subfigure 3: population size by generation
-title <- paste("BSMB Total Population Size by Generation |", opt$location, "| Lat:", latitude, "|", start_date, "to", end_date, sep=" ")
-plot(day.all, g0, main=title, type="l", ylim=c(0, max(g2)), axes=F, lwd=2, xlab="", ylab="Number", cex=3, cex.lab=3, cex.axis=3, cex.main=3)
+# Subfigure 2: population size by generation
+title <- paste("BSMB total population by generation :", opt$location, ": Lat:", latitude, ":", start_date, "to", end_date, sep=" ")
+plot(day.all, g0, main=title, type="l", ylim=c(0, max(g2)), axes=F, lwd=2, xlab="", ylab="total population", cex=3, cex.lab=3, cex.axis=3, cex.main=3)
 lines(day.all, g1, lwd = 2, lty = 1, col = 2)
 lines(day.all, g2, lwd = 2, lty = 1, col = 4)
-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"))
-axis(2, cex.axis = 3)
+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"))
+axis(2, cex.axis=3)
 leg.text <- c("P", "F1", "F2")
-legend("topleft", leg.text, lty = c(1, 1, 1), col =c(1, 2, 4), cex=3)
+legend("topleft", leg.text, lty=c(1, 1, 1), col=c(1, 2, 4), cex=3)
 if (opt$se_plot == 1) {
     # Add SE lines to plot
     # SE for adults
@@ -632,15 +632,15 @@
     lines (day.all, g2 - g2.se, col = 4, lty = 2)
 }
 
-# Subfigure 4: adult population size by generation
-title <- paste("BSMB Adult Population Size by Generation |", opt$location, "| Lat:", latitude, "|", start_date, "to", end_date, sep=" ")
-plot(day.all, g0a, ylim=c(0, max(g2a) + 100), main=title, type="l", axes=F, lwd=2, xlab="Year", ylab="Number", cex=3, cex.lab=3, cex.axis=3, cex.main=3)
+# Subfigure 3: adult population size by generation
+title <- paste("BSMB adult population by generation :", opt$location, ": Lat:", latitude, ":", start_date, "to", end_date, sep=" ")
+plot(day.all, g0a, ylim=c(0, max(g2a) + 100), main=title, type="l", axes=F, lwd=2, xlab="", ylab="adult population", cex=3, cex.lab=3, cex.axis=3, cex.main=3)
 lines(day.all, g1a, lwd = 2, lty = 1, col = 2)
 lines(day.all, g2a, lwd = 2, lty = 1, col = 4)
-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"))
-axis(2, cex.axis = 3)
+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"))
+axis(2, cex.axis=3)
 leg.text <- c("P", "F1", "F2")
-legend("topleft", leg.text, lty = c(1, 1, 1), col = c(1, 2, 4), cex=3)
+legend("topleft", leg.text, lty=c(1, 1, 1), col=c(1, 2, 4), cex=3)
 if (opt$se_plot == 1) {
     # Add SE lines to plot
     # SE for adults