From: ylunsk Lun on
Hi all,

I'm trying to plot several plots on one figure using one forloop, and I would like to delay the second, third, and subsequent plots x seconds after the previous plot begins to plot. For example, the second plot begins to plot 2 seconds after the first, the third plot plots 2 seconds after the second, and so on. Is there a way to do this?

I've tried pause(x seconds), but this results in each plot waiting x seconds to plot each point. For instance,
plot1point1, x sec,
plot2point1, x sec,
plot3point1, x sec,
plot1point2, x sec,
plot2point2, x sec,
plot3point2, x sec.......

So the plotting of each graph is not continuous, but I would like them to plot continuously, just delay the beginning.

Thanks,
Jen
From: Walter Roberson on
ylunsk Lun wrote:

> I'm trying to plot several plots on one figure using one forloop, and I
> would like to delay the second, third, and subsequent plots x seconds
> after the previous plot begins to plot. For example, the second plot
> begins to plot 2 seconds after the first, the third plot plots 2 seconds
> after the second, and so on. Is there a way to do this?

lasttime = now;
plotsstarted = 1;
nextindex(plotsstarted) = 1;
%here create the basic axes for plot #1
while true
thistime = now;
if thistime - lasttime >= PlotDelay
plotsstarted = plotsstarted + 1;
nextindex(plotsstarted) = 1;
%here create the basic axes or whatever for plot #plotsstarted
end
for K = 1 : plotsstarted
%here update plot #K to contain its data points #1 to
%nextindex(K)
nextindex(K) = nextindex(K) + 1;
end
end