figure 5 typo correction
figure 5 typo correction

khufkens/phenor
# Figure 5

# showing the different PFT datasets and model formulations
# and their respective model skill

# load the data generated by the
# run_model_comparison.r code.
library(phenor)

# load data included with the package
comparison = readRDS(file.path(path.package("phenor"),"extdata/comparison.rds"))
melaas = readRDS(file.path(path.package("phenor"),"extdata/melaas.rds"))

# generate figure as a pdf
pdf("~/Figure_5_model_comparison.pdf",8,9)

# set the outline
par(mfrow=c(4,1), oma = c(5,0,0,0))

# plot all panels
par(mar=c(0,5,2,1))
plot_model_comparison(comparison$phenocam_DB, names = FALSE, ylim = c(0,20))
legend("topleft", "Deciduous Broadleaf", bty = "n", cex = 1.5)
legend("bottomright", "a)", bty = "n", cex = 2)

# overplot labels
par(new = TRUE)
plot(0,
     type = 'n',
     xlim = c(0,1),
     ylim = c(0,1),
     ylab = "",
     axes = FALSE,
     bty = 'n')
text(0.1,0.2,
     "ecodormacy",
     cex = 1.5,
     col = "red",
     pos = 4)
text(0.55,0.2,
     "endo- and ectodormancy",
     cex = 1.5,
     col = "blue",
     pos = 4)


par(mar=c(0,5,1,1))
plot_model_comparison(melaas, names = FALSE, ylim = c(0,20))
legend("topleft", "Deciduous Broadleaf (Melaas et al. 2016)", bty = "n", cex = 1.5)
legend("bottomright", "b)", bty = "n", cex = 2)

par(mar=c(1,5,1,1))
plot_model_comparison(comparison$phenocam_EN, names = FALSE, ylim = c(0,20))
legend("topleft", "Evergreen Needleleaf", bty = "n", cex = 1.5)
legend("bottomright", "c)", bty = "n", cex = 2)

par(mar=c(1,5,0,1))
plot_model_comparison(comparison$phenocam_GR, names = TRUE)
legend("topleft", "Grassland", bty = "n", cex = 1.5)
legend("bottomright", "d)", bty = "n", cex = 2)

# close pdf device
dev.off()

# Figure 5

# showing the different PFT datasets and model formulations
# and their respective model skill

# load the data generated by the
# run_model_comparison.r code.

library(phenor)

# load data included with the package
comparison = readRDS(file.path(path.package("phenor"),"extdata/comparison.rds"))
melaas = readRDS(file.path(path.package("phenor"),"extdata/melaas.rds"))

# generate figure as a pdf
pdf("~/Figure_5_model_comparison.pdf",8,9)
# set the outline
par(mfrow=c(4,1), oma = c(5,0,0,0))

# plot all panels
par(mar=c(0,5,2,1))
plot_model_comparison(comparison$phenocam_DB, names = FALSE, ylim = c(0,20))
legend("topleft", "Deciduous Broadleaf", bty = "n", cex = 1.5)
legend("bottomright", "a)", bty = "n", cex = 2)

# overplot labels
par(new = TRUE)
plot(0,
     type = 'n',
     xlim = c(0,1),
     ylim = c(0,1),
     axes = FALSE,
     bty = 'n')
text(0.1,0.2,
     "ecodormacy",
     cex = 1.5,
     col = "red",
     pos = 4)
text(0.55,0.2,
     "endo- and ectodormancy",
     cex = 1.5,
     col = "blue",
     pos = 4)


par(mar=c(0,5,1,1))
plot_model_comparison(melaas, names = FALSE, ylim = c(0,20))
legend("topleft", "Deciduous Broadleaf (Melaas et al. 2016)", bty = "n", cex = 1.5)
legend("bottomright", "b)", bty = "n", cex = 2)

par(mar=c(1,5,1,1))
plot_model_comparison(comparison$phenocam_EN, names = FALSE, ylim = c(0,20))
legend("topleft", "Evergreen Needleleaf", bty = "n", cex = 1.5)
legend("bottomright", "c)", bty = "n", cex = 2)

par(mar=c(1,5,0,1))
plot_model_comparison(comparison$phenocam_GR, names = TRUE)
legend("topleft", "Grassland", bty = "n", cex = 1.5)
legend("bottomright", "d)", bty = "n", cex = 2)

# close pdf device
dev.off()
