diff scripts/geometry/voronoi.m @ 6826:8618f29520c6

[project @ 2007-08-24 16:02:07 by jwe]
author jwe
date Fri, 24 Aug 2007 16:02:07 +0000
parents 9fddcc586065
children a34d59fc7a91
line wrap: on
line diff
--- a/scripts/geometry/voronoi.m
+++ b/scripts/geometry/voronoi.m
@@ -33,11 +33,12 @@
 ##
 ## @example
 ## @group
-##   x = rand(10,1); y = rand(size(x));
-##   h = convhull(x,y);
-##   [vx,vy] = voronoi(x,y);
-##   plot(vx, vy, "-b", x, y, "o", x(h), y(h), "-g")
-##   legend("", "points", "hull");
+##   x = rand (10, 1);
+##   y = rand (size (x));
+##   h = convhull (x, y);
+##   [vx, vy] = voronoi (x, y);
+##   plot (vx, vy, "-b", x, y, "o", x(h), y(h), "-g")
+##   legend ("", "points", "hull");
 ## @end group
 ## @end example
 ##
@@ -66,13 +67,12 @@
   if (isscalar (varargin{1}) && ishandle (varargin{1}))
     handl = varargin{1};
     narg++;
-    obj = get (handl);
-    if (! strcmp (obj.type, "axes"))
+    if (! strcmp (get (handl, "type"), "axes"))
       error ("voronoi: expecting first argument to be an axes object");
     endif
   else
     if (nargout < 2)    
-      handl = gca();
+      handl = gca ();
     endif
   endif