pdf(pdffile, width=8, height=5) par(oma=rep(0,4), mar=c(4,4,.7,.1)) tmpin <- as.numeric(names(yhat_orig[[29]])) tmpout <- setdiff(x_in, tmpin) vv <- mean(c( max(tmpout), min(tmpin) )) plot( x_in,yhat_orig[[1]], type="n", xlab="Year", ylab="Temperature Anomaly (C)", ylim=c(-1,0.75), col="grey", main=title1, cex.main=0.8) # OLS PC1: i <- 2 lines( x_in, yhat_correct[[i]], col=2,lwd=2) lines( x_in, yhat_orig[[i]], col=2,lwd=2,lty=2) # OLS PC4: i <- 3 lines( x_in, yhat_correct[[i]], col=5,lwd=2) lines( x_in, yhat_orig[[i]], col=5,lwd=2,lty=2) # OLS PC10: i <- 4 lines( x_in, yhat_correct[[i]], col=3,lwd=2) lines( x_in, yhat_orig[[i]], col=3,lwd=2,lty=2) # OLS G5 PC5: i <- 17 lines( x_in, yhat_correct[[i]], col=4,lwd=2) lines( x_in, yhat_orig[[i]], col=4,lwd=2,lty=2) # EIV from M08 (truncated at 1850) if (tilj == "no") { lines(as.numeric(names(yhat_orig[[28]][1:850])), yhat_orig[[28]][1:850], col=6, lwd=2) } else { lines(as.numeric(names(yhat_orig[[30]][1:850])), yhat_orig[[30]][1:850], col=6, lwd=2) } # Add CRU: lines(as.numeric(names(yhat_orig[[29]])), yhat_orig[[29]], col=1, lwd=2) abline(v=vv) legend(1480,0.75,c("CRU","OLS PC1","OLS PC4","OLS PC10","OLS G5 PC5","M08 EIV"),col=c("black","red","5","green","blue","6"),lwd=c(2,2,2,2,2,2), title="Orig (dashed)/Correct (solid)") dev.off()