longts.plot(y1, y2 = NULL,
names1 = NULL, names2 = NULL,
startP = start(y1)[1], upf = 14, fpp = 5, overlap = 0.5,
x.ann = NULL, dx.ann = 1, dx.tick = 0.25 * dx.ann,
ny.ann = 3, cex.ann = par("cex.axis"),
xlab = "", y1lab = "", y2lab = "",
col.y1 = "black", col.y2 = "black",
cex.lab = par("cex.lab"),
y1lim = range(y1, na.rm = T, finite=TRUE),
y2lim = range(y2, na.rm = T, finite=TRUE),
lty1 = 1, lty2 = 2, lwd1 = 1, lwd2 = 2,
col1 = NULL, col2 = NULL,
leg = TRUE, y1nam.leg = NULL, y2nam.leg = NULL,
ncol.leg = NULL, cex.leg = 1.5,
h1 = NULL, h2 = NULL, col.h1 = "gray70", col.h2 = "gray70",
main = NULL, cex.main = par("cex.main"),
automain = is.null(main),
mgp = c(2, 0.7, 0), mar = c(2,3,1,3)+.1,
oma = if (automain|!is.null(main))
c(0,0,2,0) else par("oma"),
cex = par("cex"), type = "s", slide = FALSE, each.fig = 1,
filename = NULL, extension = NULL, filetype = NULL, ...)
y1
)
and on the right (for y2
) respey1
, from which algorithm takes the annotations for
the x-axis.TRUE
, the units of the start and
the end on the page are printed in the title.par
.plot
.FALSE
, the first page (screen) is
plotted only. When TRUE
, user may leaf through the pages
interactively.each.fig==1
all data are plotted.
for each.fig==2
every 2nd page is plotted and
so on.filename
is not
NULL
, the displayed screen(s) are saved to the
disk. When slide = TRUE
, the filename of the plots is
extended by a serial number. The extension is defined automatically
on wisavePlot(filename = filename, type =
filetype, ...)
, where filename ist defined above. Tplot.ts
provides.
longts.plot
provides the user with all these features for
regular time series. As in general, time series are often stored
together with an eplicit time axis and for the sake of highest
flexibility, the arguments for controlling the annotation of the time
axis is not standard: For the annotation, time labels have to be
delivered for each point of y1
, from which algorithm
takes the annotations for the x-axis.
p.ts
is another function for plotting long time
series. The main differences are: p.ts
can also plot irregular
times series. p.ts
has only one y-axis, cannot automatically
plot a legend and has the full output always on one page.data(sunspots)
longts.plot(sunspots,upf=ceiling((end(sunspots)-start(sunspots))[1]/5),
dx.ann=10, dx.tick=1)
if (require(SwissAir)) {
data(AirQual)
st <- levels(AirQual$start)[AirQual$start]
longts.plot(y1=AirQual[,c("ad.O3","ad.NOx")], y2 = AirQual$ad.T,
names1=c("O3","NOx"),names2="Temp",
startP = 6.5*30*48, upf=7*48, dx.ann=48,
x.ann=substr(st,1,6),
y1lab="[ppb]", y2lab="[�C]",
y1lim=c(0,150), y2lim=c(10,30),
col2="red", type="l")
}
Run the code above in your browser using DataLab