diff scripts/plot/scatter3.m @ 7215:dd88d61d443f

[project @ 2007-11-29 16:44:45 by jwe]
author jwe
date Thu, 29 Nov 2007 16:46:40 +0000
parents a730e47fda4d
children d65670971cbc
line wrap: on
line diff
--- a/scripts/plot/scatter3.m
+++ b/scripts/plot/scatter3.m
@@ -55,24 +55,19 @@
 
 function retval = scatter3 (varargin)
 
+  [h, varargin, nargin] = __plt_get_axis_arg__ ("scatter3", varargin{:});
+
   if (nargin < 2)
     print_usage ();
-  elseif (isscalar (varargin{1}) && ishandle (varargin{1}))
-    h = varargin{1};
-    if (! strcmp (get (h, "type"), "axes"))
-      error ("scatter3: expecting first argument to be an axes object");
-    endif
+  else
     oldh = gca ();
     unwind_protect
       axes (h);
       newplot ();
-      tmp = __scatter__ (h, 3, "scatter3", varargin{2:end});
+      tmp = __scatter__ (h, 3, "scatter3", varargin{:});
     unwind_protect_cleanup
       axes (oldh);
     end_unwind_protect
-  else
-    newplot ();
-    tmp = __scatter__ (gca (), 3, "scatter3", varargin{:});
   endif
 
   if (! ishold ())