Mercurial > hg > octave-lyh
diff scripts/plot/patch.m @ 7216:5389a52df87b
[project @ 2007-11-29 19:07:29 by jwe]
author | jwe |
---|---|
date | Thu, 29 Nov 2007 19:07:29 +0000 |
parents | dd88d61d443f |
children | eb7bdde776f2 |
line wrap: on
line diff
--- a/scripts/plot/patch.m +++ b/scripts/plot/patch.m @@ -34,13 +34,12 @@ ## Author: jwe -function h = patch (varargin) +function retval = patch (varargin) [h, varargin] = __plt_get_axis_arg__ ("patch", varargin{:}); + oldh = gca (); - if (isnan(h)) - h = oldh; - endif + unwind_protect axes (h); [tmp, fail] = __patch__ (h, varargin{:}); @@ -53,7 +52,7 @@ endif if (nargout > 0) - h = tmp; + retval = tmp; endif endfunction