[R] Automatic adjustment of axis ranges

Andrew C. Ward andreww at cheque.uq.edu.au
Thu Jul 18 04:47:51 CEST 2002


Daniel,

I don't think it's possible to do exactly what you want using
the example you've given. You could either A) re-plot the
data with the new points, or B) make the axis limits large
enough to cope with data of "reasonable" magnitude.
Neither of these gives you the dynamic redrawing you
want, however.

Others may point you to some nifty Tcl or other GUI way
of doing that, which I will be keen to hear about.

Regards,

Andrew C. Ward

CAPE Centre,
The University of Queensland
Brisbane Qld 4072 Australia
andreww at cheque.uq.edu.au


----- Original Message -----
From: Daniel Mastropietro <mastropi at uwalumni.com>
To: <R-help at stat.math.ethz.ch>
Sent: Thursday, July 18, 2002 10:13 AM
Subject: [R] Automatic adjustment of axis ranges


> Hello,
>
> I would like to know if it is possible to add new points to a given plot
> and that the axis ranges be automatically adjusted so that all the new
> points are seen in the plot.
> For example, I am thinking of something like this:
>
> plot(1:10,1:10);
> points(5:20,2*(5:20)); # This would change the x range to 0-20 and the y
> range to 0-40 so that all the new points are fitted in the graph.
>
> Thanks
> Daniel Mastropietro
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-
> 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
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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