% visible_off.m
% Save time drawing a complex GUI by turning the visibility on 
% after creating the complete GUI.
echo on
f = figure('visible', 'off');

h_first = uicontrol('style', 'check', 'string', 'first', ...
    'tag', 'h_first', 'position', [20 40 60 20]);
h_second = uicontrol('style', 'check', 'string', 'second', ...
    'tag', 'h_second', 'position', [20 80 60 20]);

% Press a key to turn the visibility on.
pause

set(f, 'vis', 'on');

echo off