Mercurial > hg > octave-avbm
diff scripts/plot/semilogx.m @ 7207:71c03c7239fb
[project @ 2007-11-28 02:19:25 by jwe]
author | jwe |
---|---|
date | Wed, 28 Nov 2007 02:20:48 +0000 (2007-11-28) |
parents | a1dbe9d80eee |
children | 5389a52df87b |
line wrap: on
line diff
--- a/scripts/plot/semilogx.m +++ b/scripts/plot/semilogx.m @@ -29,17 +29,22 @@ function retval = semilogx (varargin) - newplot (); + [h, varargin] = __plt_get_axis_arg__ ("semilogx", varargin{:}); + oldh = gca (); + unwind_protect + axes (h); + newplot (); - ## [h, varargin] = __plt_get_axis_arg__ ("semilogx", varargin{:}); - h = gca (); + set (h, "xscale", "log"); - set (h, "xscale", "log"); - - tmp = __plt__ ("semilogx", h, varargin{:}); + tmp = __plt__ ("semilogx", h, varargin{:}); - if (nargout > 0) - retval = tmp; - endif + if (nargout > 0) + retval = tmp; + endif + + unwind_protect_cleanup + axes (oldh); + end_unwind_protect endfunction