How can i use same colormap for diferent imagesc?

for i=1:tam %anima los tubos axes(handles.axes21); colormap('default'); imagesc(temp1); set(handles.axes21,'visible','off') hold on;
axes(handles.axes22);
imagesc(temp2);
set(handles.axes22,'visible','off')
hold on;
axes(handles.axes25);
imagesc(temp3);
set(handles.axes25,'visible','off')
hold on;
axes(handles.axes26);
imagesc(temp4);
set(handles.axes26,'visible','off')
hold on;
drawnow;
auxTemp=vectorTemperaturas(:,i);
%variables para la animacion de los tubos
temp1=(cat(1,auxTemp((IBAR/2)+3:end-1)));
temp2=fliplr((auxTemp(3:(IBAR/2)+1)'))'; %tubo 2
temp3=auxTemp(end);%fuente
temp4=auxTemp(((IBAR/2)+2));%sumidero
end
end
Hold on, seems to be the answer but as it's a loop it becomes slower and slower! pleaseeee help! THANKS!

Answers (1)

Yes that will happen because the axes keeps stacking up image after image as you load them in. Each one covers up the prior one. I find that if you call "cla reset" after you call "axes()" then it will not slow down as you go through all the images.

Categories

Find more on Graphics Performance in Help Center and File Exchange

Asked:

on 20 May 2014

Answered:

on 20 May 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!