Mercurial > hg > octave-lyh
diff scripts/plot/plotmatrix.m @ 17310:6ba5b1dadd61
plotmatrix.m: Replace ifelse() construction with if/endif.
* scripts/plot/plotmatrix.m: Replace ifelse() construction with if/endif.
Move argument return out of unwind_protect to end of function.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 20 Aug 2013 22:35:08 -0700 |
parents | b5d6314314fc |
children | 177147bf7b55 |
line wrap: on
line diff
--- a/scripts/plot/plotmatrix.m +++ b/scripts/plot/plotmatrix.m @@ -72,19 +72,15 @@ print_usage (); endif - oldfig = ifelse (isempty (bigax2), [], get (0, "currentfigure")); + oldfig = []; + if (! isempty (bigax2)) + oldfig = get (0, "currentfigure"); + endif unwind_protect bigax2 = newplot (bigax2); [h2, ax2, p2, pax2] = __plotmatrix__ (bigax2, varargin{:}); - if (nargout > 0) - h = h2; - ax = ax2; - bigax = bigax2; - p = p2; - pax = pax2; - endif axes (bigax2); ctext = text (0, 0, "", "visible", "off", "handlevisibility", "off", "xliminclude", "off", @@ -98,6 +94,14 @@ endif end_unwind_protect + if (nargout > 0) + h = h2; + ax = ax2; + bigax = bigax2; + p = p2; + pax = pax2; + endif + endfunction