On Sun, 14 Mar 2004, Jan Verbesselt wrote:

> Dear R specialists,
> 
> I have two time series in a data.frame and want to plot them in the same
> plot(), with the left axis scaled to time series 1 (-700,0) and the
> right axis scaled to time series 2 (-0.2, 0.4). 
> 
> plot(timeserie1)
> lines(timeserie2, col=c(2)) => this one should be scaled differently

Why c(2)?

> with a new axis on the right handside.
> 
> How can these be visualised such that the fit is optimal for
> visualisation of the two time series? Which commands can I use?

plot(timeserie1)
par(new=T)
plot(timeserie2, yaxt="n", type="l", col=2, ylab="")
axis(4)

provided the two series have the same timebase.

-- 
Brian D. Ripley,                  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[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