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),
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
> 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,
>
3 matches
Mail list logo