changeset 24588:c12b5cec5c6c

contour3.m: Pull axes configuration commands inside unwind_protect block. * contour3.m: Pull axes configuration commands inside unwind_protect block as all other draw routines do.
author Rik <rik@octave.org>
date Thu, 11 Jan 2018 16:47:13 -0800
parents 6ece7c7e4912
children 9b36fc7bd002
files scripts/plot/draw/contour3.m
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/draw/contour3.m	Wed Jan 10 17:50:13 2018 -0500
+++ b/scripts/plot/draw/contour3.m	Thu Jan 11 16:47:13 2018 -0800
@@ -74,17 +74,18 @@
     hax = newplot (hax);
 
     [ctmp, htmp] = __contour__ (hax, "auto", varargin{:});
+
+  if (! ishold ())
+    set (hax, "view", [-37.5, 30], "box", "on",
+              "xgrid", "on", "ygrid", "on", "zgrid", "on");
+  endif
+
   unwind_protect_cleanup
     if (! isempty (oldfig))
       set (0, "currentfigure", oldfig);
     endif
   end_unwind_protect
 
-  if (! ishold ())
-    set (hax, "view", [-37.5, 30],
-              "xgrid", "on", "ygrid", "on", "zgrid", "on");
-  endif
-
   if (nargout > 0)
     c = ctmp;
     h = htmp;