Mercurial > hg > octave-nkf
diff scripts/plot/scatter3.m @ 17069:1cbdd14711c5
scatter3.m, scatter.m: Update to use new __plt_get_axis_arg__.
* scripts/plot/scatter3.m, scripts/plot/scatter.m: Update to use new
__plt_get_axis_arg__.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Tue, 23 Jul 2013 18:31:22 +0200 |
parents | 7277fe922e99 |
children | eaab03308c0b |
line wrap: on
line diff
--- a/scripts/plot/scatter3.m +++ b/scripts/plot/scatter3.m @@ -56,23 +56,25 @@ function retval = scatter3 (varargin) - [h, varargin, nargin] = __plt_get_axis_arg__ ("scatter3", varargin{:}); + [hax, varargin, nargin] = __plt_get_axis_arg__ ("scatter3", varargin{:}); if (nargin < 2) print_usage (); else - oldh = gca (); + oldfig = ifelse (isempty (hax), [], get (0, "currentfigure")); unwind_protect - axes (h); - newplot (); - tmp = __scatter__ (h, 3, "scatter3", varargin{:}); + hax = newplot (hax); + + tmp = __scatter__ (hax, 3, "scatter3", varargin{:}); unwind_protect_cleanup - axes (oldh); + if (! isempty (oldfig)) + set (0, "currentfigure", oldfig); + endif end_unwind_protect endif - if (! ishold ()) - set (h, "view", [-37.5, 30], + if (! ishold (hax)) + set (hax, "view", [-37.5, 30], "xgrid", "on", "ygrid", "on", "zgrid", "on"); endif