MATLAB: Plot multiple points in a for loop

plot time movie for

Hello everyone, I have a for loop which is plotting different points over a certain amount of time. Right now the previous point is removed when the next one is added, but i would like to keep the old points.
n=100
for i=1:n+1
plot(i,i,'r.','MarkerSize',10);
axis([0 110 0 110])
f(i) = getframe(gcf);
end
Hopefully someone can help me with that.

Best Answer

use hold
n=100
for i=1:n+1
plot(i,i,'r.','MarkerSize',10);
hold on
axis([0 110 0 110])
f(i) = getframe(gcf);
end
hold off