Description Usage Arguments Author(s) Examples
Plots the time series
1 | timeseries(x, is = 1, denominator='total area', ylab=NULL,...)
|
x |
a time series object |
is |
index - which series to plot |
denominator |
Denominator |
ylab |
see |
... |
arguments passed on to |
Rasmus.Benestad@met.no
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x, is = 2, ...)
{
par(bty = "n")
y <- x[, is]
plot(y, main = attr(x, "longname")[is], plot.type = "single",
col = c("red", "blue", "grey"), sub = paste("TMRR ",
paste(abs(range(lat(x))), collapse = "S-"), "N: ",
min(year(y)), " - ", max(year(y)), sep = ""), ylab = attr(x,
"unit")[is], xlab = "", ylim = c(0, max(y)), ...)
for (i in 1:length(is)) {
lines(trend(y[, i]))
t1 <- trend(y[, i])[1]
t2 <- trend(y[, i])[length(index(y))]
lines(c(as.Date("1990-01-01"), index(y)[1]), rep(t1,
2), col = rgb(0.5, 0.5, 0.5, 0.5), lwd = 2)
lines(c(as.Date("1990-01-01"), index(y)[length(index(y))]),
rep(t2, 2), col = rgb(0.5, 0.5, 0.5, 0.5), lwd = 2)
text(as.Date("1997-08-01"), t1, round(t1), cex = 0.7)
text(as.Date("1997-08-01"), t2, round(t2), cex = 0.7)
}
grid()
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.