comparison 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
comparison
equal deleted inserted replaced
7214:86d0b16f2bb2 7215:dd88d61d443f
53 ## @seealso{plot, patch, scatter} 53 ## @seealso{plot, patch, scatter}
54 ## @end deftypefn 54 ## @end deftypefn
55 55
56 function retval = scatter3 (varargin) 56 function retval = scatter3 (varargin)
57 57
58 [h, varargin, nargin] = __plt_get_axis_arg__ ("scatter3", varargin{:});
59
58 if (nargin < 2) 60 if (nargin < 2)
59 print_usage (); 61 print_usage ();
60 elseif (isscalar (varargin{1}) && ishandle (varargin{1})) 62 else
61 h = varargin{1};
62 if (! strcmp (get (h, "type"), "axes"))
63 error ("scatter3: expecting first argument to be an axes object");
64 endif
65 oldh = gca (); 63 oldh = gca ();
66 unwind_protect 64 unwind_protect
67 axes (h); 65 axes (h);
68 newplot (); 66 newplot ();
69 tmp = __scatter__ (h, 3, "scatter3", varargin{2:end}); 67 tmp = __scatter__ (h, 3, "scatter3", varargin{:});
70 unwind_protect_cleanup 68 unwind_protect_cleanup
71 axes (oldh); 69 axes (oldh);
72 end_unwind_protect 70 end_unwind_protect
73 else
74 newplot ();
75 tmp = __scatter__ (gca (), 3, "scatter3", varargin{:});
76 endif 71 endif
77 72
78 if (! ishold ()) 73 if (! ishold ())
79 set (get (tmp, "parent"), "view", [-37.5, 30]); 74 set (get (tmp, "parent"), "view", [-37.5, 30]);
80 endif 75 endif