I decided to solve my issue using the gridExtra library, because it permits a very high flexibility. Here is the code
dB_HH <- subset(fileInMelt, variable == "mean_HH_dB")
dB_VV <- subset(fileInMelt, variable == "mean_VV_dB")
dB_HH.VV <- subset(fileInMelt, variable == "mean_HH.VV_dB")
dB_alpha <- subset(fileInMelt, variable == "mean_alpha")
dB_entropy <- subset(fileInMelt, variable == "mean_entropy")
# -----------------------------------------------------------------------------------------------------------------------
# charts
myChartHH <- ggplot(data=dB_HH, aes(x=DOY, y=value, color=ROI)) +
geom_line(size=1.4) +
geom_point(size=2.2) +
guides(color=guide_legend(title=NULL)) +
labs(y = "HH") +
labs(x = "") +
scale_y_continuous(limits = c(-24,-4)) +
theme(legend.position="none")
# x11(width = 50, height = 50)
# plot(myChartHH)
# ---------------------------------------------------------------
myChartVV <- ggplot(data=dB_VV, aes(x=DOY, y=value, color=ROI)) +
geom_line(size=1.4) +
geom_point(size=2.2) +
guides(color=guide_legend(title=NULL)) +
labs(y = "VV") +
labs(x = "") +
scale_y_continuous(limits = c(-24,-4)) +
theme(legend.position="none")
# x11(width = 50, height = 50)
# plot(myChartVV)
# ---------------------------------------------------------------
myChartHHVV <- ggplot(data=dB_HH.VV, aes(x=DOY, y=value, color=ROI)) +
geom_line(size=1.4) +
geom_point(size=2.2) +
guides(color=guide_legend(title=NULL)) +
labs(y = "HH/VV") +
labs(x = "") +
scale_y_continuous(limits = c(-4,8)) +
theme(legend.position="none")
# x11(width = 50, height = 50)
# plot(myChartHHVV)
# ---------------------------------------------------------------
myChartAlpha <- ggplot(data=dB_alpha, aes(x=DOY, y=value, color=ROI)) +
geom_line(size=1.4) +
geom_point(size=2.2) +
guides(color=guide_legend(title=NULL)) +
labs(y = "alpha") +
labs(x = "") +
scale_y_continuous(limits = c(0,90)) +
theme(legend.position="none")
# x11(width = 50, height = 50)
# plot(myChartAlpha)
# ---------------------------------------------------------------
myChartEntropy <- ggplot(data=dB_entropy, aes(x=DOY, y=value, color=ROI)) +
geom_line(size=1.4) +
geom_point(size=2.2) +
guides(color=guide_legend(title=NULL)) +
labs(y = "entropy") +
labs(x = "DOY") +
scale_y_continuous(limits = c(0,1)) +
theme(legend.position="none")
# x11(width = 50, height = 50)
# plot(myChartEntropy)
# ---------------------------------------------------------------
totChart <- grid.arrange(myChartHH,
myChartVV,
myChartHHVV,
myChartAlpha,
myChartEntropy,
ncol=1)
x11(width = 50, height = 50)
plot(totChart)