OK so I’ve got a plotting loop which plots an expanding and contracting object. The data
for each frame is in a huge matrix.
I’ve found the min and max values of each frame for the x,y,z coordinates of the object. So I’ve got the limiting planes of the object’s expansion reach.
The plotting loop has several plotting commands. The first line of the loop is clf:
for frame = 1:N %N is the number of frames
clf;
hold on;
axis([minX maxX minY maxY minZ maxZ]);
% Plotting commands...(skipped here)
drawnow;
end
The axes change periodically. They will not change between successive frames but say at frame 300 they will change and then will change back at say frame 700 and do that again.
I’ve checked with get(gcf, ‘CurrentAxes’) and the values are different. Not sure why. The axis limits are constant.
EDIT: With some data set this doesn’t happen but with some the axes change periodically as described.
Try putting the
axiscommand after the plotting commands.