[R] plot.ts: number of "columns"; "ylab"

Martin Maechler maechler at stat.math.ethz.ch
Thu Sep 25 15:47:00 CEST 2003


>>>>> "Ernesto" == Ernesto Jardim <ernesto at ipimar.pt>
>>>>>     on Wed, 24 Sep 2003 12:46:21 +0100 writes:

    Ernesto> Hi,
    Ernesto> How can I force a plot.ts to draw a 2x2 plot matrix instead of 4x1 ?

nc = 2

can be set.
Here is an example that also answers the related question about
setting of "ylab".
It can't be done, via ylab, but via setting the colnames() of
the time-series matrix :

> z <- ts(matrix(rnorm(600), 100, 6), start=c(1961, 1), frequency=12)
> colnames(z) <- paste("Z", 1:6,sep="_")
> plot(z)
> plot(z,nc=1)
> plot(z,nc=3)

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><




More information about the R-help mailing list