Mercurial > hg > octave-lyh
diff scripts/plot/surface.m @ 17040:55b76fd1244b
surface.m: Update to use new __plt_get_axis_arg__ without using "axes" function.
* scripts/plot/surface.m: Removed axes call to change currentfigure/axes
properties. Removed unwind_protect block which is not needed any more.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Mon, 22 Jul 2013 23:37:00 +0200 |
parents | df66488b8d43 |
children | eaab03308c0b |
line wrap: on
line diff
--- a/scripts/plot/surface.m +++ b/scripts/plot/surface.m @@ -45,13 +45,11 @@ [hax, varargin] = __plt_get_axis_arg__ ("surface", varargin{:}); - oldax = gca (); - unwind_protect - axes (hax); - [htmp, bad_usage] = __surface__ (hax, varargin{:}); - unwind_protect_cleanup - axes (oldax); - end_unwind_protect + if (isempty (hax)) + hax = gca (); + endif + + [htmp, bad_usage] = __surface__ (hax, varargin{:}); if (bad_usage) print_usage ();