Mercurial > hg > octave-nkf
diff scripts/plot/contour3.m @ 17050:9ff7d4849f03
contour[3f].m: Update to use new __plt_get_axis_arg__.
* scripts/plot/contourf.m, scripts/plot/contour3.m, scripts/plot/contour.m:
Update to use new __plt_get_axis_arg__. Rename xh to hax.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Tue, 23 Jul 2013 14:45:31 +0200 |
parents | 64e7bb01fce2 |
children | eaab03308c0b |
line wrap: on
line diff
--- a/scripts/plot/contour3.m +++ b/scripts/plot/contour3.m @@ -51,19 +51,21 @@ function [c, h] = contour3 (varargin) - [xh, varargin, nargin] = __plt_get_axis_arg__ ("contour3", varargin{:}); + [hax, varargin, nargin] = __plt_get_axis_arg__ ("contour3", varargin{:}); - oldh = gca (); + oldfig = ifelse (isempty (hax), [], get (0, "currentfigure")); unwind_protect - axes (xh); - newplot (); - [ctmp, htmp] = __contour__ (xh, "auto", varargin{:}); + hax = newplot (hax); + + [ctmp, htmp] = __contour__ (hax, "auto", varargin{:}); unwind_protect_cleanup - axes (oldh); + if (! isempty (oldfig)) + set (0, "currentfigure", oldfig); + endif end_unwind_protect if (! ishold ()) - set (xh, "view", [-37.5, 30], + set (hax, "view", [-37.5, 30], "xgrid", "on", "ygrid", "on", "zgrid", "on"); endif