[R] replot

Marc Schwartz MSchwartz at medanalytics.com
Wed Sep 3 18:33:57 CEST 2003


On Wed, 2003-09-03 at 10:39, solares at unsl.edu.ar wrote:
> Hi, how i cant replot a graphics, te function replot() not exist in R
> for
> win 1.7.1, how i cant without plot.new?


In general, you need to simply re-execute the function or series of
functions (with any changes) to re-display a plot. There is no "refresh"
function per se. 

If you might be looking to add a plot to an existing plot, use:

par(new = TRUE)

prior to generating the second plot. This will enable you to overlay a
new plot on an existing one, without first clearing the old plot.

If you have a complicated series of calls to generate the plot, it is
best to save the R code in a separate file. Then you can edit it and
either copy and paste the code into the R console or use source() to
read the code into R.


HTH,

Marc Schwartz




More information about the R-help mailing list