drawnow()
drawnow flushes the event queue and updates the figure window.
x = -pi:pi/20:pi; plot(x, cos(x)) drawnow title('Title Here ...') grid on