[R] plotting two curves: Why same hight?
Uwe Ligges
ligges at statistik.uni-dortmund.de
Fri Aug 2 09:14:12 CEST 2002
Francisco J Molina wrote:
>
> R 1.5.1 in a linux machine.
>
> I am plotting two curves with curve ():
>
> sin(x)/10 and sin(x)
>
> together, one below the other one ( using par ( mfrow = c ( 2, 1 ))).
> What I have noticed is that both curves have the same height but this
> should not be so
>From R's point of view it should, because R scales the axes for each
plot "optimal" in a way.
> since the range of values of the first function is
> shorter than the one of the second function.
>
> In the description of par I could not find any command to fix the
> solution.
The argument is mentioned in ?plot and called ylim:
par(mfrow = c(2, 1))
curve(sin(x)/10, 0, 10, ylim = c(-1, 1))
curve(sin(x), 0, 10, ylim = c(-1, 1))
Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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