Dear R People:

Someone had asked a question about plotting 2 time series
with different y-axes.  There is a nice example in S+, but here is
a toy example (modified from the S+ example) which someone may find
useful:

> y1 <- rnorm(48)
> y2 <- rnorm(48)
> y1.ts <- ts(y1,start=c(1996,1),freq=12)
> y2.ts <- ts(y2,start=c(1996,1),freq=12)
> par(mar=rep(5,4))
> plot(y1.ts,ylab="Horses")
> par(new=T)
> plot(window(y2.ts,start(y1.ts),end(y1.ts)),lty=2,
+ axes=F,ylab=" ")
> axis(4)
> mtext("Hounds",side=4,line=3)
> title(main="Horses and Hounds")
> 

Hope this helps!

Sincerely,
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: [EMAIL PROTECTED]

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to