diff scripts/plot/scatter.m @ 17404:5e552cd9315a

Overhaul scatter family of functions * scripts/plot/module.mk: Remove unused function __color_str_rgb__.m from build. * scripts/plot/private/__color_str_rgb__.m: Remove unnecessary function. * scripts/plot/scatter.m: Put input validation first. Adjust indentation. * scripts/plot/scatter3.m: Put input validation first. Adjust indentation. Use htmp instead of tmp for temporary graphics handle. * scripts/plot/private/__scatter__.m: Update "markeredgecolor" in child patch objects when same property is updated in hggroup. Accept "fill" for "filled" for Matlab compatibility. Remove call to __color_str_rgb__. Don't bother saving graphics handle from __go_patch__ since it is never used. Use cellfun instead of for loop for input processing.
author Rik <rik@octave.org>
date Tue, 10 Sep 2013 16:31:34 -0700
parents ed149e891876
children
line wrap: on
line diff
--- a/scripts/plot/scatter.m	Tue Sep 10 10:57:52 2013 -0700
+++ b/scripts/plot/scatter.m	Tue Sep 10 16:31:34 2013 -0700
@@ -74,21 +74,21 @@
 
   if (nargin < 2)
     print_usage ();
-  else
+  endif
+
   oldfig = [];
   if (! isempty (hax))
     oldfig = get (0, "currentfigure");
   endif
-    unwind_protect
-      hax = newplot (hax);
-      
-      htmp = __scatter__ (hax, 2, "scatter", varargin{:});
-    unwind_protect_cleanup
+  unwind_protect
+    hax = newplot (hax);
+    
+    htmp = __scatter__ (hax, 2, "scatter", varargin{:});
+  unwind_protect_cleanup
     if (! isempty (oldfig))
       set (0, "currentfigure", oldfig);
     endif
-    end_unwind_protect
-  endif
+  end_unwind_protect
 
   if (nargout > 0)
     retval = htmp;