MATLAB: Help please. i have 2 axes plots on the GUI , i want to reset the output plot(clear the previous output from plot) as i press the load image image button.

guiMATLAB

please help

Best Answer

In the LoadImage button callback:
% Reset first axes.
axes(handles.axes1); % Whichever axes you want to reset.

cla('reset');
% Reset second axes.
axes(handles.axes2); % Whichever axes you want to reset.
cla('reset');
axes(handles.axes1); % Whichever axes you want to display in.
imshow(yourImage);