[R] can I add to a plot and auto-re-scale axes?

Mark Myatt mark at myatt.demon.co.uk
Thu Oct 4 10:58:32 CEST 2001


Robert D. Merithew <merithew at ccmr.cornell.edu> writes:
>(I'm new to R)
> 
>Is there a way to add data to an existing plot, and have the plot axes
>rescaled automatically (i.e. if the new data lie outside the current
>axes) ?
> 
>If not, how can I specify multiple datasets at once, so the axes are
>scaled to accomodate all sets?

Rescaling is not possible as the scale is set by the first call to
plot(). If by "add data" you mean that you want to plot multiple data
series and you now in advance which series you want to add then you
should set ylim on the first plot() call to the range of the widest data
series and then add the series to the initial plot.

Mark

--
Mark Myatt


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