#'@title temp
#'@description temp
#'@return temp
#'@author Mike Vlah
#'@export
plotpH_DIC <- function(modelResults){
d = modelResults$timeSeries
hour = seq(d$localHour[1], length.out=nrow(d), by=1/6)
int_hr_inds = which(hour %% 1 == 0)
# ymin = min(c(d$pH, d$TCO2), na.rm=TRUE)
# ymax = max(c(d$pH, d$TCO2), na.rm=TRUE)
par(mar=c(3,4,1,4))
plot(hour, d$pH, main='', xlab='', ylab='pH', xaxt='n', type='l',
col='seagreen4')
axis(1, at=hour[int_hr_inds[c(T,F)]], padj=-1,
labels=d$localHour[int_hr_inds[c(T,F)]], cex.axis=0.8)
axis(1, at=hour[int_hr_inds], labels=rep('', length(int_hr_inds)),
tck=-0.02)
par(new=TRUE)
plot(hour, d$TCO2, main='', xlab='', ylab='', xaxt='n', type='l',
col='sienna1', yaxt='n')
axis(4)
mtext('DIC conc (umol/L)', 4, line=2.5)
lab_adj = floor(length(hour) / 30)
axis(1, at=hour[1], labels='Hour:', xpd=NA, tick=FALSE, cex.axis=0.8,
padj=-1, hadj=1.5, font=2)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.