# Figures for Klepstand manuscript # ----------------------------------------------------------------------------------- # Plot the datasets together # ----------------------------------------------------------------------------------- # This script is only to make the plots for the publications require(scales) # Figure 3 Fed_gape = read.csv("Fed_gape.csv") starved_gape = read.csv("starved_gape.csv") par(mfcol=c(1,2)) par(mar=c(2,4,2,2)) Fed=c(Fed_gape$Perc.1,Fed_gape$Perc.2,Fed_gape$Perc.5,Fed_gape$Perc.6) #Maak nieuwe datavector door alle gevoerde dieren samen te nemen Starved=c(starved_gape$Perc.3,starved_gape$Perc.4,starved_gape$Perc.7) Breaks=c(0,0.1,0.20,0.3,0.40,0.5,0.60,0.7,0.80,0.9,1) a1=hist(Fed,breaks=Breaks,probability=TRUE,main="FED")#Fed (Norw-1,Norw-2,Grev-1,Grev-2) a2=hist(Starved,breaks=Breaks,probability=TRUE,main="Starved")#unfed(Norw-3,Norw-4,Norw-7) #Fractions a1$cumulation=cumsum(a1$counts) a2$cumulation=cumsum(a2$counts) a1$Perc=(a1$counts/a1$cumulation[10]) a2$Perc=(a2$counts/a2$cumulation[10]) a2$Perc = a2$Perc * 100 a1$Perc = a1$Perc * 100 par(mar=c(4,4,2,2)) par(mfcol=c(1,2)) Labels=c("0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1") #tickmarks midden tussen klassen #barplot(a1$density,main="Fed",col=3,xlab="Gape class",ylim=c(0,10),space=0,cex.lab=1.25) np=barplot(a1$Perc,ylim=c(0,70),main="A: Tank-1 Fed",col=3,las=2,space=0,xlab="Gape class",ylab="Percentage time spent",cex.lab=1.25) axis(side=1, at=np+0.5,labels=Labels,las=2,cex.axis=0.8) np=barplot(a2$Perc,ylim=c(0,70),main="B: Tank-2 Starved",col=2,las=2,space=0,xlab="Gape class",ylab="",cex.lab=1.25) axis(side=1, at=np+0.5,labels=Labels,las=2,cex.axis=0.8) # ------------------------------------------------------------------- # Figure 4 par(mfcol=c(1,2)) par(mar=c(2,4,2,2)) boxplot(Fed,Starved,col=c(3,2),names=c("FED","STARVED"),ylab="Relative valve gape", cex=1.25, las = 1) mtext("A: Entire period",side=3,line=1, cex=1.25) par(mar=c(2,4,2,2)) boxplot(Fed[Fed>=0.2],Starved[Starved>=0.2],col=c(3,2),names=c("FED","STARVED"),ylab="", ylim = c(0, 1), las = 1) mtext("B: Valve gape > 0.2",side=3,line=1, cex=1.25) # ------------------------------------------------------------------- # Figure 5 # ------------------------------------ #### Betonbak vs. tidal # ------------------------------------ Perc_BB_30 = read.csv("Perc_BB_30.csv")[ ,-1] highTide = Perc_BB_30$Beton_tide_BB_30.Tide > 0.87 12.5*sum(highTide)/length(highTide) #correct for the polygon (last point needs to match value of first point) polyTide = highTide * 100000 - 100000/2 polyTide = c(polyTide, polyTide[1]) par(mfrow = c(4,1), mar = c(1,6,1,6), oma = c(4, 2, 2,2)) for(i in 2:9){ plot(Perc_BB_30[ ,i], type = "l", las = 1, ylab = "", ylim = c(-1, 1), xaxt = "n", ann = FALSE) mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(Perc_BB_30$Beton_tide_BB_30.Tide, ylim = c(-2, 4), axes = F, xlab = NA, ylab = NA, type = "l", col = "red", lty = 3) mtext(side = 4, line = 3, "Tidal level (m)", col = "red") axis(side = 4, at = seq(from = min(Perc_BB_30$Beton_tide_BB_30.Tide), to = max(Perc_BB_30$Beton_tide_BB_30.Tide), length.out = 5), labels = round(seq(from = min(Perc_BB_30$Beton_tide_BB_30.Tide), to = max(Perc_BB_30$Beton_tide_BB_30.Tide), length.out = 5), 0), col.axis = "red", las = 1) abline(h = 0.87, lty = 2, col = "blue", lwd = 1.5) polygon(x = 1:length(polyTide), y = polyTide, col = alpha("gray",0.4), lty = 0) text(800, -1.6, paste(gsub(".", " ", colnames(Perc_BB_30), fixed=TRUE)[i],sep=""), cex = 2) axis(side = 1, at = seq(from = 0, to = nrow(Perc_BB_30), by = nrow(Perc_BB_30)/17), labels = NA) } axis(side = 1, at = seq(from = 0, to = nrow(Perc_BB_30), by = nrow(Perc_BB_30)/17), labels = c(0:17)) mtext(side = 1, line = 3.5, "Time (Days)") legend("bottomleft", c("Gape", "Temperature"),bty="n",cex=1.25, lty = c(1, 3), col = c("black", "red"), lwd = c(2,2)) # ------------------------------------------------------------------- # Figure 6 # Change fraction to percentage (0 to 70) LOW = Perc_BB_30[Perc_BB_30$timeSinceTideOnset.hours > 3.6, ] HIGH= Perc_BB_30[Perc_BB_30$timeSinceTideOnset.hours <= 3.6, ] Fed= data.frame(LOW[1], stack(LOW[2:9])) #Maak nieuwe datavector door alle gevoerde dieren samen te nemen Fed = Fed$values Starved = data.frame(HIGH[1], stack(HIGH[2:9])) Starved = Starved$values Breaks=c(0,0.1,0.20,0.3,0.40,0.5,0.60,0.7,0.80,0.9,1) a1=hist(Fed,breaks=Breaks,probability=TRUE,main="Emerged") a2=hist(Starved,breaks=Breaks,probability=TRUE,main="Submerged") #Fractions a1$cumulation=cumsum(a1$counts) a2$cumulation=cumsum(a2$counts) a1$Perc=(a1$counts/a1$cumulation[10]) a2$Perc=(a2$counts/a2$cumulation[10]) a2$Perc = a2$Perc * 100 a1$Perc = a1$Perc * 100 #swap the treatments par(mfcol=c(1,2)) par(oma=c(4,4,2,2)) par(mar=c(4,4,2,2)) Labels=c("0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1") #tickmarks midden tussen klassen #barplot(a1$density,main="Fed",col=3,xlab="Gape class",ylim=c(0,10),space=0,cex.lab=1.25) np=barplot(a2$Perc,ylim=c(0,70),main="A: Connection",col=3,las=2,space=0,xlab="Gape class",ylab="Percentage time spent",cex.lab=1.25) axis(side=1, at=np+0.5,labels=Labels,las=2,cex.axis=0.8) np=barplot(a1$Perc,ylim=c(0,70),main="B: No connection",col=2,las=2,space=0,xlab="Gape class",ylab="",cex.lab=1.25) axis(side=1, at=np+0.5,labels=Labels,las=2,cex.axis=0.8) # ------------------------------------------------------------------- # Figure 7 Fed= data.frame(LOW[1], stack(LOW[2:9])) #Maak nieuwe datavector door alle gevoerde dieren samen te nemen Fed = Fed$values Starved = data.frame(HIGH[1], stack(HIGH[2:9])) Starved = Starved$values par(mfcol=c(1,2)) par(mar=c(2,4,2,2)) boxplot(Starved,Fed,col=c(3,2),names=c("Connection","No connection"),ylab="Relative valve gape", ylim = c(0,1), cex=1.25, las = 1) mtext("A: Entire period",side=3,line=1, cex=1.25) boxplot(Starved[Starved>=0.2],Fed[Fed>=0.2],col=c(3,2),names=c("Connection","No connection"), ylim = c(0, 1),ylab="", las = 1) mtext("B: Valve gape > 0.2",side=3,line=1, cex=1.25) #mtext("mean valve gape",side = 1,outer=TRUE,at=0.5,line=2) mean(Fed[Fed>=0.2]) #=0.67 =0.71 sd(Fed[Fed>=0.2]) #0.18 =0.17 mean(Starved[Starved>=0.2]) #0.52 =0.52 sd(Starved[Starved>=0.2]) #0.12 =0.12 # ------------------------------------------------------------------- # Figure 8A in manuscript # ------------------------------------ #### Summer # ------------------------------------ Perc_zo_30 = read.csv("Perc_zo_30.csv")[ ,-1] ENVI_zo_30 = read.csv("ENVI_zo_30.csv")[ ,-1] Perc_wi_30 = read.csv("Perc_wi_30.csv")[ ,-1] ENVI_wi_30 = read.csv("ENVI_wi_30.csv")[ ,-1] par(mfrow = c(3,1), mar = c(1,6,1,6), oma = c(4, 2, 2,2)) # a plot(Perc_zo_30[ ,2], type = "l", las = 1, ylab = "", ylim = c(0, 1), xaxt = "n", ann = FALSE) mtext(side = 3, "A", cex = 2, font = 2) mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(ENVI_zo_30$Temp..deg.C., type = "l", col = "red", axes = F, xlab = NA, ylab = NA, lty = 3) mtext(side = 4, line = 3, "Temperature (\u00B0C)", col = "red") axis(side = 4, at = seq(from = min(ENVI_zo_30$Temp..deg.C.), to = max(ENVI_zo_30$Temp..deg.C.), length.out = 5), labels = round(seq(from = min(ENVI_zo_30$Temp..deg.C.), to = max(ENVI_zo_30$Temp..deg.C.), length.out = 5), 0), col.axis = "red", las = 1) axis(side = 1, at = seq(from = 0, to = 816, by = 48), labels = NA) text(800, 16.9, "Oyster 1", cex = 2) # b plot(Perc_zo_30[ ,3], type = "l", las = 1, ylab = "", ylim = c(0, 1), xaxt = "n", ann = FALSE) mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(ENVI_zo_30$Temp..deg.C., type = "l", col = "red", axes = F, xlab = NA, ylab = NA, lty = 3) mtext(side = 4, line = 3, "Temperature (\u00B0C)", col = "red") axis(side = 4, at = seq(from = min(ENVI_zo_30$Temp..deg.C.), to = max(ENVI_zo_30$Temp..deg.C.), length.out = 5), labels = round(seq(from = min(ENVI_zo_30$Temp..deg.C.), to = max(ENVI_zo_30$Temp..deg.C.), length.out = 5), 0), col.axis = "red", las = 1) axis(side = 1, at = seq(from = 0, to = 816, by = 48), labels = NA) text(800, 16.9, "Oyster 2", cex = 2) # c plot(Perc_zo_30[ ,4], type = "l", las = 1, ylab = "", ylim = c(0, 1), xaxt = "n", ann = FALSE) mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(ENVI_zo_30$Temp..deg.C., type = "l", col = "red", axes = F, xlab = NA, ylab = NA, lty = 3) mtext(side = 4, line = 3, "Temperature (\u00B0C)", col = "red") axis(side = 4, at = seq(from = min(ENVI_zo_30$Temp..deg.C.), to = max(ENVI_zo_30$Temp..deg.C.), length.out = 5), labels = round(seq(from = min(ENVI_zo_30$Temp..deg.C.), to = max(ENVI_zo_30$Temp..deg.C.), length.out = 5), 0), col.axis = "red", las = 1) legend("topleft", c("Gape", "Temperature"),bty="n",cex=1.25, lty = c(1, 3), col = c("black", "red"), lwd = c(2,2)) axis(side = 1, at = seq(from = 0, to = 816, by = 48), labels = c(0:17)) mtext(side = 1, line = 3.5, "Time (Days)") text(800, 16.9, "Oyster 5", cex = 2) # ------------------------------------------------------------------- # ---------------------------------------------------------------------------- # Figure 8B in manuscript # ------------------------------------ #### Winter # ------------------------------------ # gape vs. turbidity par(mfrow = c(3,1), mar = c(1,6,1,6), oma = c(4, 2, 2,2)) # a plot(Perc_wi_30[ ,3], type = "l", las = 1, ylab = "", ylim = c(0, 1), xaxt = "n", ann = FALSE) mtext(side = 3, "B", cex = 2, font = 2) mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(ENVI_wi_30$Turb...M.FTU., type = "l", col = "red", axes = F, xlab = NA, ylab = NA, lty = 3) mtext(side = 4, line = 3, "FTU", col = "red") axis(side = 4, at = seq(from = min(ENVI_wi_30$Turb...M.FTU.), to = max(ENVI_wi_30$Turb...M.FTU.), length.out = 5), labels = round(seq(from = min(ENVI_wi_30$Turb...M.FTU.), to = max(ENVI_wi_30$Turb...M.FTU.), length.out = 5), 0), col.axis = "red", las = 1) axis(side = 1, at = seq(from = 0, to = 816, by = 48), labels = NA) text(800, 255, "Oyster 6", cex = 2) # b plot(Perc_wi_30[ ,4], type = "l", las = 1, ylab = "", ylim = c(0, 1), xaxt = "n", ann = FALSE) mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(ENVI_wi_30$Turb...M.FTU., type = "l", col = "red", axes = F, xlab = NA, ylab = NA, lty = 3) mtext(side = 4, line = 3, "FTU", col = "red") axis(side = 4, at = seq(from = min(ENVI_wi_30$Turb...M.FTU.), to = max(ENVI_wi_30$Turb...M.FTU.), length.out = 5), labels = round(seq(from = min(ENVI_wi_30$Turb...M.FTU.), to = max(ENVI_wi_30$Turb...M.FTU.), length.out = 5), 0), col.axis = "red", las = 1) axis(side = 1, at = seq(from = 0, to = 816, by = 48), labels = NA) text(800, 255, "Oyster 7", cex = 2) # c plot(Perc_wi_30[ ,5], type = "l", las = 1, ylab = "", ylim = c(0, 1), xaxt = "n", ann = FALSE) mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(ENVI_wi_30$Turb...M.FTU., type = "l", col = "red", axes = F, xlab = NA, ylab = NA, lty = 3) mtext(side = 4, line = 3, "FTU", col = "red") axis(side = 4, at = seq(from = min(ENVI_wi_30$Turb...M.FTU.), to = max(ENVI_wi_30$Turb...M.FTU.), length.out = 5), labels = round(seq(from = min(ENVI_wi_30$Turb...M.FTU.), to = max(ENVI_wi_30$Turb...M.FTU.), length.out = 5), 0), col.axis = "red", las = 1) legend("topleft", c("Gape", "FTU"),bty="n",cex=1.25, lty = c(1, 3), col = c("black", "red"), lwd = c(2,2)) axis(side = 1, at = seq(from = 0, to = 816, by = 48), labels = c(0:17)) mtext(side = 1, line = 3.5, "Time (Days)") text(800, 255, "Oyster 8", cex = 2) # ---------------------------------------------------------------------------- # Figure 9 Del_zo = read.csv("Voordelta_zo_Perc.csv") Del_wi = read.csv("Voordelta_wi_Perc.csv") par(mfcol=c(1,2)) par(mar=c(2,4,2,2)) Fed=c(Del_zo$Perc.1.1,Del_zo$Perc.2,Del_zo$Perc.5,Del_zo$Perc.7, Del_zo$Perc.8) #Maak nieuwe datavector door alle gevoerde dieren samen te nemen Starved=c(Del_wi$Perc.1.1,Del_wi$Perc.6,Del_wi$Perc.7, Del_wi$Perc.8) #maak nieuwe datavector door alle starved dieren samen te voegen. a1=hist(Fed,breaks=Breaks,probability=TRUE,main="FED")#Fed (Norw-1,Norw-2,Grev-1,Grev-2) a2=hist(Starved,breaks=Breaks,probability=TRUE,main="Starved")#unfed(Norw-3,Norw-4,Norw-7) #Fractions a1$cumulation=cumsum(a1$counts) a2$cumulation=cumsum(a2$counts) a1$Perc=(a1$counts/a1$cumulation[10]) a2$Perc=(a2$counts/a2$cumulation[10]) a2$Perc = a2$Perc * 100 a1$Perc = a1$Perc * 100 par(oma=c(2,2,2,2)) par(mar=c(4,4,2,2)) Breaks=c(0,0.1,0.20,0.3,0.40,0.5,0.60,0.7,0.80,0.9,1) par(mar=c(4,4,2,2)) par(mfcol=c(1,2)) Labels=c("0.1","0.2","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1") np=barplot(a1$Perc,ylim=c(0,70),main="A: Spring",col=3,las=2,space=0,xlab="Gape class",ylab="Percentage time spent",cex.lab=1.25) axis(side=1, at=np+0.5,labels=Labels,las=2,cex.axis=0.8) np=barplot(a2$Perc,ylim=c(0,70),main="B: Autumn",col=2,las=2,space=0,xlab="Gape class",ylab="",cex.lab=1.25) axis(side=1, at=np+0.5,labels=Labels,las=2,cex.axis=0.8) # ---------------------------------------------------------------------------- # Figure 10 par(mar=c(2,4,2,2)) boxplot(Fed,Starved,col=c(3,2),names=c("Spring","Autumn"),ylab="Relative valve gape", cex=1.25, las = 1) mtext("A: Entire period",side=3,line=1, cex=1.25) boxplot(Fed[Fed>=0.2],Starved[Starved>=0.2],col=c(3,2),names=c("Spring","Autumn"), ylab="", las = 1, ylim = c(0, 1)) mtext("B: Valve gape > 0.2",side=3,line=1, cex=1.25) # ---------------------------------------------------------------------------- # Supplemental Figure 4 - Betonbak Perc_BB_day = read.csv("Perc_BB_day.csv")[ ,-1] ENVI_BB_day = read.csv("ENVI_BB_day.csv")[ ,-1] par(mfrow = c(3,1), mar = c(1,6,1,6), oma = c(4, 2, 2,2)) plot(Perc_BB_day[ ,3], type = "l", las = 1, ylab = "", ylim = c(0, 1), ann = FALSE, xaxt = "n") mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(ENVI_BB_day$Temp..deg.C., type = "l", col = "red", axes = F, xlab = NA, ylab = NA, lty = 3) mtext(side = 4, line = 3.5, "Temperature (\u00B0C)", col = "red") axis(side = 4, at = seq(from = min(ENVI_BB_day$Temp..deg.C.), to = max(ENVI_BB_day$Temp..deg.C.), length.out = 5), labels = round(seq(from = min(ENVI_BB_day$Temp..deg.C.), to = max(ENVI_BB_day$Temp..deg.C.), length.out = 5), 1), col.axis = "red", las = 1) axis(side=1, at=1:17,labels= NA) text(17.4, 24.4, "a", cex = 2.5, font = 2) plot(Perc_BB_day[ ,3], type = "l", las = 1, ylab = "", ylim = c(0, 1), ann = FALSE, xaxt = "n") mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(ENVI_BB_day$Chl.a.ug.l., type = "l", col = "red", axes = F, xlab = NA, ylab = NA, lty = 3) mtext(side = 4, line = 3.5, expression( mu~"g L"^{-1}), col = "red") axis(side = 4, at = seq(from = min(ENVI_BB_day$Chl.a.ug.l.), to = max(ENVI_BB_day$Chl.a.ug.l.), length.out = 5), labels = round(seq(from = min(ENVI_BB_day$Chl.a.ug.l.), to = max(ENVI_BB_day$Chl.a.ug.l.), length.out = 5), 0), col.axis = "red", las = 1) mtext(side = 2, line = 3, "Relative valve gape") axis(side=1, at=1:17,labels= NA) text(17.4, 11.6, "b", cex = 2.5, font = 2) plot(Perc_BB_day[ ,3], type = "l", las = 1, ylab = "", ylim = c(0, 1), ann = FALSE, xaxt = "n") mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(ENVI_BB_day$Turb...M.FTU., type = "l", col = "red", axes = F, xlab = NA, ylab = NA, lty = 3) mtext(side = 4, line = 3.5, "FTU", col = "red") axis(side = 4, at = seq(from = min(ENVI_BB_day$Turb...M.FTU.), to = max(ENVI_BB_day$Turb...M.FTU.), length.out = 5), labels = round(seq(from = min(ENVI_BB_day$Turb...M.FTU.), to = max(ENVI_BB_day$Turb...M.FTU.), length.out = 5), 0), col.axis = "red", las = 1) mtext(side = 1, line = 3.5, "Time (Days)") axis(side=1, at=1:17,labels= c(1:17)) text(17.4, 7.6, "c", cex = 2.5, font = 2) # ---------------------------------------------------------------------------- # Supplemental Figure 5 - summer Perc_zo_day = read.csv("Perc_zo_day.csv")[ ,-1] ENVI_zo_day = read.csv("ENVI_zo_day.csv")[ ,-1] par(mfrow = c(3,1), mar = c(1,6,1,6), oma = c(4, 2, 2,2)) plot(Perc_zo_day[ ,2], type = "l", las = 1, ylab = "", ylim = c(0, 1), ann = FALSE, xaxt = "n") mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(ENVI_zo_day$Temp..deg.C., type = "l", col = "red", axes = F, xlab = NA, ylab = NA, lty = 3) mtext(side = 4, line = 3.5, "Temperature (\u00B0C)", col = "red") axis(side = 4, at = seq(from = min(ENVI_zo_day$Temp..deg.C.), to = max(ENVI_zo_day$Temp..deg.C.), length.out = 5), labels = round(seq(from = min(ENVI_zo_day$Temp..deg.C.), to = max(ENVI_zo_day$Temp..deg.C.), length.out = 5), 1), col.axis = "red", las = 1) axis(side=1, at=1:17,labels= NA) text(16.7, 16.4, "Oyster 1", cex = 2) mtext(side = 3, "A", cex = 2, font = 2) plot(Perc_zo_day[ ,2], type = "l", las = 1, ylab = "", ylim = c(0, 1), ann = FALSE, xaxt = "n") mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(ENVI_zo_day$Chl.a.ug.l., type = "l", col = "red", axes = F, xlab = NA, ylab = NA, lty = 3) mtext(side = 4, line = 3.5, expression( mu~"g L"^{-1}), col = "red") axis(side = 4, at = seq(from = min(ENVI_zo_day$Chl.a.ug.l.), to = max(ENVI_zo_day$Chl.a.ug.l.), length.out = 5), labels = round(seq(from = min(ENVI_zo_day$Chl.a.ug.l.), to = max(ENVI_zo_day$Chl.a.ug.l.), length.out = 5), 1), col.axis = "red", las = 1) mtext(side = 2, line = 3, "Relative valve gape") axis(side=1, at=1:17,labels= NA) text(16.7, 12.5, "Oyster 1", cex = 2) plot(Perc_zo_day[ ,2], type = "l", las = 1, ylab = "", ylim = c(0, 1), ann = FALSE, xaxt = "n") mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(ENVI_zo_day$Turb...M.FTU., type = "l", col = "red", axes = F, xlab = NA, ylab = NA, lty = 3) mtext(side = 4, line = 3.5, "FTU", col = "red") axis(side = 4, at = seq(from = min(ENVI_zo_day$Turb...M.FTU.), to = max(ENVI_zo_day$Turb...M.FTU.), length.out = 5), labels = round(seq(from = min(ENVI_zo_day$Turb...M.FTU.), to = max(ENVI_zo_day$Turb...M.FTU.), length.out = 5), 1), col.axis = "red", las = 1) mtext(side = 1, line = 3.5, "Time (Days)") axis(side=1, at=1:17,labels= c(1:17)) text(16.7, 34, "Oyster 1", cex = 2) # ---------------------------------------------------------------------------- # Supplemental Figure 5 - winter Perc_wi_day = read.csv("Perc_wi_day.csv")[ ,-1] ENVI_wi_day = read.csv("ENVI_wi_day.csv")[ ,-1] par(mfrow = c(3,1), mar = c(1,6,1,6), oma = c(4, 2, 2,2)) plot(Perc_wi_day[ ,3], type = "l", las = 1, ylab = "", ylim = c(0, 1), ann = FALSE, xaxt = "n") mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(ENVI_wi_day$Temp..deg.C., type = "l", col = "red", axes = F, xlab = NA, ylab = NA, lty = 3) mtext(side = 4, line = 3.5, "Temperature (\u00B0C)", col = "red") axis(side = 4, at = seq(from = min(ENVI_wi_day$Temp..deg.C.), to = max(ENVI_wi_day$Temp..deg.C.), length.out = 5), labels = round(seq(from = min(ENVI_wi_day$Temp..deg.C.), to = max(ENVI_wi_day$Temp..deg.C.), length.out = 5), 1), col.axis = "red", las = 1) axis(side=1, at=1:17,labels= NA) text(16.7, 13.2, "Oyster 6", cex = 2) mtext(side = 3, "B", cex = 2, font = 2) plot(Perc_wi_day[ ,3], type = "l", las = 1, ylab = "", ylim = c(0, 1), ann = FALSE, xaxt = "n") mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(ENVI_wi_day$Chl.a.ug.l., type = "l", col = "red", axes = F, xlab = NA, ylab = NA, lty = 3) mtext(side = 4, line = 3.5, expression( mu~"g L"^{-1}), col = "red") axis(side = 4, at = seq(from = min(ENVI_wi_day$Chl.a.ug.l.), to = max(ENVI_wi_day$Chl.a.ug.l.), length.out = 5), labels = round(seq(from = min(ENVI_wi_day$Chl.a.ug.l.), to = max(ENVI_wi_day$Chl.a.ug.l.), length.out = 5), 0), col.axis = "red", las = 1) mtext(side = 2, line = 3, "Relative valve gape") axis(side=1, at=1:17,labels= NA) text(16.7, 2.55, "Oyster 6", cex = 2) plot(Perc_wi_day[ ,3], type = "l", las = 1, ylab = "", ylim = c(0, 1), ann = FALSE, xaxt = "n") mtext(side = 2, line = 3, "Relative valve gape") par(new=TRUE) plot(ENVI_wi_day$Turb...M.FTU., type = "l", col = "red", axes = F, xlab = NA, ylab = NA, lty = 3) mtext(side = 4, line = 3.5, "FTU", col = "red") axis(side = 4, at = seq(from = min(ENVI_wi_day$Turb...M.FTU.), to = max(ENVI_wi_day$Turb...M.FTU.), length.out = 5), labels = round(seq(from = min(ENVI_wi_day$Turb...M.FTU.), to = max(ENVI_wi_day$Turb...M.FTU.), length.out = 5), 0), col.axis = "red", las = 1) mtext(side = 1, line = 3.5, "Time (Days)") axis(side=1, at=1:17,labels= c(1:17)) text(16.7, 25.5, "Oyster 6", cex = 2)