# HG changeset patch # User Pantxo Diribarne # Date 1374529020 -7200 # Node ID 55b76fd1244b3b92c22d37a82fe4bfe26fdbda3f # Parent 854cfc72c64fae5de1ee9b3da5a9744ffbaea4b3 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. diff --git a/scripts/plot/surface.m b/scripts/plot/surface.m --- 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 ();