[R-SIG-Mac] Loop: plot does not update

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Nov 2 08:35:57 CET 2009


We don't have a reproducible example, nor the details asked for in the 
posting guide.

But a likely explanation is that the windows() device (on Windows, if 
that is the OS your 'a PC' is running) is double-buffered (by 
default), and the quartz() is not.  Thus rather than being a 'problem 
on your Mac', it may well be a feature on Windows. Using the X11() 
device may be a workaround if your X server is fast enough.

Whether the plot 'is getting re-drawn from scratch at every step of 
the loop' depends how you programmed it: R will do as you ask, but you 
haven't given us any indication what that was, and best solution is to 
avoid asking for too much plotting for each frame of an animation.

On Sun, 1 Nov 2009, Felipe Zapata wrote:

> I am running a loop which updates a plot after carrying out some
> calculations (i.e., calculating 2 integrals along a line defined in a
> PCA space).  However, I am having trouble visualizing the plot for
> this loop using R 2.9.1 (OS 10.5.8, MBP 2.53 Ghz Core Duo, 4GB) as it
> does not go smoothly as it should.  When I run the loop in a PC, the
> plot updates nicely and continuously. When I run it in my Mac, the
> plot just flashes and it seems as if it is getting re-drawn from
> scratch at every step of the loop.  Has anybody experienced a similar
> problem in your Mac?? i wonder if this is a general mac issue or
> something specific to my computer.
> Thanks
>
> F
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-SIG-Mac mailing list