MATLAB: Does UIWAIT interfere with the ‘EraseMode’ property of line objects in MATLAB 7.0 (R14)

draweraseerasemodelineMATLABpauserenderuiwait

The inclusion of UIWAIT in my GUI seems to interfere with the 'EraseMode' property setting of line objects in MATLAB 7.0 (R14). In particular, line objects in my GUI have the 'EraseMode' property set to 'none'; but when I add UIWAIT, the line objects behave as if their 'EraseMode' property is set to 'normal'. This can be demonstrated by inserting the following command immediately after DRAWNOW (Line 243) in the Lorenz Attractor Animation demo, "lorenz.m":
uiwait(gcf,.5)

Best Answer

UIRESUME calls the SET command on a figure property. Changing properties on
non-erasemode objects causes redraws which, in turn, can erase stuff drawn with erase-mode 'none'. Instead of using
uiwait(gcf,.5)
it is recommended to use
pause(0.5)