function setgraphvisibility(h,stat)
%SETGRAPHVISIBILITY
%
% Author(s): James G. Owen
% Revised:
% Copyright 1986-2003 The MathWorks, Inc.
% $Revision: 1.1.6.1 $ $Date: 2004/12/26 21:33:52 $

if ~isempty(h.Window) && ishandle(h.Window)
   set(h.Window,'Visible',stat);
end