[R] Different y-axes

Don MacQueen macq at llnl.gov
Tue Jun 11 15:48:38 CEST 2002


Here is an example:

x <- 1:5
y1 <- 1:5
y2 <- 25:21
plot(x,y1)
par(new=T)
plot(x,y2,yaxt='n',col='blue')
axis(4,y2)

-Don

At 12:40 PM +0200 6/11/02, Gregor Gawron wrote:
>Hi All,
>
>I have checked everything I could find abot graphics, but still cannot
>solve the problem.
>Are there any ways to make a graph that plots two lines and two
>different y-axes, each of them has a scale that is related to the
>respective line. For example, y1 has a range 1:50 and y1 ranges 0:1. The
>x-axe is the same for both.
>
>Thank you in advance.
>
>---
>Gregor Gawron
>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
>r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
>Send "info", "help", or "[un]subscribe"
>(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


-- 
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
--------------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list