Skip to content
Prev 336130 / 398513 Next

Plotting multiple time series with variables having different units

Perhaps I misunderstood your question.  Jeff Newmiller says that you did 
not want multiple y-scales on the same plot, which is how I read what 
you wrote.  If you just want plots of X vs. time, Y vs. time, etc.
"stacked" one above the other then you perhaps should simple use 
par(mfrow(.,.)) or perhaps layout().

You could also try using lattice graphics.  Toy example:

require(lattice)
set.seed(42)
junk <- data.frame(x=rnorm(100),time=rep(1:20,5),
                    witch=rep(LETTERS[22:26],each=20))
xyplot(x~time|witch,data=junk,layout=c(1,5,1),type="l",as.table=TRUE)

HTH

cheers,

Rolf Turner
On 03/02/14 10:11, David Parkhurst wrote: