Functions | |
function | cla (varargin) if(nargin > 2) print_usage() |
elseif (nargin > 1) if(ishandle(varargin | |
&& | strcmp (get(varargin{1},"type"),"axes")&&ischar(varargin = gca |
&& | strcmpi (varargin{2},"reset")) oldhax = [] |
else | print_usage () |
endif | elseif (nargin==1) if(ishandle(varargin |
elseif (ischar(varargin{1})&&strcmpi(varargin{1},"reset")) hax | |
if (!do_reset &&!isempty(hc)) hc | |
endif | if (!isempty(hc)) delete(hc) |
endif | axes (hax) |
axis auto | axes (oldhax) |
!unwind_protect!clf | !plot (1:10)%!cla()%!kids |
!cla ()%!unwind_protect_cleanup%!close(hf)%!end_unwind_protect%!assert(numel(kids) | |
Variables | |
hax = varargin{1} | |
do_reset = true | |
oldhax = hax | |
endif | hc = get (hax, "children") |
endfunction!test | !hf = figure (1, "visible", "off") |
!cla | ( | ) |
! unwind_protect ! clf !plot | ( | 1:10 | ) |
function cla | ( | varargin | ) |
elseif | ( | ischar(varargin{1})&&strcmpi(varargin{1},"reset") | ) |
elseif | ( | nargin | , | |
1 | ||||
) |
endif if | ( | ! | isemptyhc | ) |
if | ( | !do_reset &&! | isemptyhc | ) |
else print_usage | ( | ) |
&& strcmp | ( | get(varargin{1},"type") | , | |
"axes" | ||||
) | = gca |
endfunction !test !hf = figure (1, "visible", "off") |
do_reset = true |