Hello, I have some data that I would like to animate. The code is below:
The vectors x(:,i), y(:,i), and z(:,i), are the coordinates of various points in space, where i is the ith frame of the animation; the value x(j,i) would be the jth point in the ith frame of the animation. All points are plotted simultaneously.
for i = 1:size(x,1) plot3(x(:,i), y(:,i), z(:,i), 'go'); axis(axislimits); set(gca,'Color',[0.1 0.1 0.1],'Xcolor',[1 1 1],'Ycolor',[1 1 1],'Zcolor',[1,1,1]); axis square; grid on; pause(1/60);end
Is there a way to set the axis properties, so that MATLAB won't have to redraw it every time it goes through the loop?
Best Answer