Segue algumas alternativas:
library(repmis) # reads text data directly from dropbox - no need to
download any file
# read data
tmp <- repmis::source_data(url, sep = '', header = TRUE)
# convert julian day to date
date <- as.Date(tmp$julian, origin='2011-12-31')
data <- cbind(date, tmp)
head(data)
# define vector with depth of soil layers
depths <- c(0.05,0.10,0.20,0.30,
0.40,0.60,0.80,1.00,
1.50,2.00,2.50)
# teste com lattice
cols <- ncol(data):4
levelplot(as.matrix(data[, cols]),
aspect = "fill",
xlab = "date", ylab = "soil Moist.",
scales = list(x =
list(at = which(date %in% pretty(date)),
labels = pretty(date)),
y = list(at = length(cols):1, labels = depths)),
contour = T)
# Plot soil moisture profile
# como são profundidades (abaixo da superfície) use a convenção de z
negativo
# acrescentei a chuva, precisa ajustar ylabels, mtext() resolve
x11()
op <- par(mar = c(3,4,12,3))
plot <- filled.contour(date, sort(-depths), as.matrix(data[, cols]),
ylab = expression(theta(m^3~~m^-3)))
par(new=T,mar=c(23,4,1,8))
with(data,
plot(date, precip, type = "h", xaxt = "n",
xpd = T, xaxs="i", ylab = "Precip (mm)", xlab = ""))
par(op)