[R] Time delay function or plot animation

Ulrike Grömping groemping at tfh-berlin.de
Tue Dec 13 12:40:31 CET 2005


Tobias, thanks to you and others, who made the same suggestion. This is 
exactly what I was looking for, Sys.sleep(0.1) does the job much more quietly 
than my previous solution ...
Regards, Ulrike

---------- Original Message ----------- 
From: Tobias Verbeke <tobias.verbeke at telenet.be> 
To: Ulrike Grömping <groemp at tfh-berlin.de> 
Cc: r-help at stat.math.ethz.ch 
Sent: Mon, 12 Dec 2005 21:14:26 +0100 
Subject: Re: [R] Time delay function or plot animation

> Ulrike Grömping wrote: 
> 
> >is it possible to specify a time delay for plotting the points in a curve? 
I 
> >would like to make the plotting process slow enough to show the 
development 
> >of the graph, and therefore I am looking either for the possibility within 
> >the plot function to specify a plotting speed or (if that doesn't exist) 
for 
> >a function like "pause" or "wait" that allows to specify a time delay 
until 
> >the next statement is executed. I have searched help and mailing list 
> >archives, but I don't seem to look for the right keywords. My current 
> >solution is very crude: 
> > 
> >I add the following to an existing plot: 
> > 
> >for (i in 1:steps) 
> >{ 
> >lines(x[i:(i+1)], y[i:(i+1)]) 
> >   #calculations with the sole purpose of generating a time delay 
> >   zoeger<-1 
> >   for (j in 1:85000) 
> >   {zoeger<-zoeger*j} 
> >} 
> > 
> >Is there a better way to achieve this? 
> >   
> > 
> See ?Sys.sleep 
> 
> HTH, 
> Tobias 
> 
> >Regards, Ulrike 
> > 
> >______________________________________________ 
> >R-help at stat.math.ethz.ch mailing list 
> >https://stat.ethz.ch/mailman/listinfo/r-help 
> >PLEASE do read the posting guide! http://www.R-project.org/posting-
guide.html 
> > 
> > 
> >   
> > 
------- End of Original Message -------




More information about the R-help mailing list