Re: [R] Plot with pauses?

2015-11-12 Thread Greg Snow
Here is one option if you don't want to write the explicit for loop (there is still a loop): library(TeachingDemos) v<-0:60 z<-3/5+4i/5 t<-z^(v/9) tmpfun <- function(npoints) { plot( Re(t)[seq_len(npoints)], Im(t)[seq_len(npoints)], xlab="Real", ylab="Imaginary", xlim=c(-1,1),

[R] Plot with pauses?

2015-11-11 Thread Judson
I'm trying to create a series of demos for students. It would be helpful if plotted data points could appear one by one with, say, half-second delays between points. For instance, code like this v<-0:60 z<-3/5+4i/5 t<-z^(v/9) plot(Re(t),Im(t)) would be better if I could invoke some

Re: [R] Plot with pauses?

2015-11-11 Thread David Winsemius
> On Nov 11, 2015, at 9:30 PM, Judson wrote: > > I'm trying to create a > series of demos for students. > > It would be helpful > if plotted data points > could appear one by one > with, say, half-second delays > between points. > ?Sys.sleep > For instance, >