[R] Different y-axes

Jonathan Baron baron at cattell.psych.upenn.edu
Tue Jun 11 13:39:26 CEST 2002


On 06/11/02 12:40, Gregor Gawron wrote:
>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.

I haven't tried this, but how about plotting y1 against x as
usual, then plot y2 (I assume) against x using points() or
lines(), with a suitable choice of ylim, such as ylim=c(0,1), and
then add the axis using axis().

-- 
Jonathan Baron, Professor of Psychology, University of Pennsylvania
Home page:            http://www.sas.upenn.edu/~baron
R page:               http://finzi.psych.upenn.edu/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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