Westerschelde June 2013
library(reshape)
library(plot3D)
load("WSboxes.rda")
MonitorData <- get(load("SampleData.rda"))
VarNameTemp <- c("WNH4", "WNO3", "WNO2", "WPO4", "WSi", "WC%O2", "WCPH", "SPMCHLA", "SPMCMG", "SPMCNRAT", "SPM%C", "SPM", "WSECCHI", "WCTEMP", "WCSALIN")
VarTitleTemp <- c("NH4", "NO3", "NO2", "PO4", "Si", "O2", "pH", "ChlA", "POC", "C:N", "%C", "SPM", "Secchi", "Temperature", "Salinity")
VarUnitsTemp <- c(rep("mmol m-3", length.out = 5), "%" , "-", "mg m-3", "g m-3", "mol/mol", "%", "g m-3", "cm", "dgC", "")
MonVar <- list("Name" = VarNameTemp, "Title" = VarTitleTemp, "Units" = VarUnitsTemp)
Long <- MonitorData[as.character(MonitorData$VariableName) %in% MonVar$Name, c("StatNr", "VariableName", "DataValue")]
Cross <- cast(Long, StatNr ~ VariableName, value = 'DataValue')
xlim <- c(3.5, 4.3) #range(polyX, na.rm = TRUE)
ylim <- c(51.25, 51.51) #range(polyY, na.rm = TRUE)
par(oma = c(2,0,2,1))
par(mfrow = c(5, 3), mar = c(2, 2, 2, 2))
for (i in 1:length(MonVar$Name)) {
polygon2D(polyX, polyY, colvar = Cross[1:11, MonVar$Name[i]], main = MonVar$Title[i],
clab = MonVar$Units[i], border = "black", xlab = "", ylab = "", axes = FALSE,
xlim = xlim, ylim = ylim, frame.plot = TRUE)
}
mtext("Karline Soetaert - using R", 1, 1, adj = 0, cex = 0.6, outer = TRUE)
mtext(format(Sys.time(), "%m/%d/%Y"), 1, 1, adj = 1, cex = 0.6, outer=TRUE)
mtext("Source: NIOZ-Yerseke Monitoring", 1,0,adj=0.5, cex=0.6, outer=T)
mtext(outer = TRUE, side = 3, "Westerschelde, June 1999", cex = 1.25)
Go back