changeset 10701:657e63dcfd88

scatter.m: Properly set default value markersize and marker type.
author Ben Abbott <bpabbott@mac.com>
date Sat, 12 Jun 2010 20:35:04 -0400
parents a3c04f036352
children c49911ab7ac7
files scripts/ChangeLog scripts/plot/private/__scatter__.m scripts/plot/scatter.m
diffstat 3 files changed, 22 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Sat Jun 12 12:55:03 2010 -0400
+++ b/scripts/ChangeLog	Sat Jun 12 20:35:04 2010 -0400
@@ -1,3 +1,9 @@
+2010-06-12  Ben Abbott <bpabbott@mac.com>
+
+	* plot/scatter.m: New demo.
+	* plot/private/__scatter__.m: Properly set default value markersize
+	and marker type.
+
 2010-06-12  Rik <octave@nomad.inbox5.com>
 
         * plot/scatter.m: Add new calling forms of function to documentation.
--- a/scripts/plot/private/__scatter__.m	Sat Jun 12 12:55:03 2010 -0400
+++ b/scripts/plot/private/__scatter__.m	Sat Jun 12 20:35:04 2010 -0400
@@ -56,7 +56,8 @@
     s = varargin{istart};
     if (isempty (s) || ischar (s))
       s = 6;
-    else
+    endif
+    if (! ischar (varargin{istart}))
       istart++;
     endif
   else
@@ -94,6 +95,7 @@
         if (strncmp (marker, "none", 4))
           marker = "o";
         elseif (isempty (marker))
+          have_marker = false;
           [dummy, marker] = __next_line_style__ ();
         endif
       else
@@ -102,7 +104,7 @@
     else
       newargs{end+1} = arg;
       if (iarg <= nargin)
-        newargs{end+1} = varagin{iarg++};
+        newargs{end+1} = varargin{iarg++};
       endif
     endif
   endwhile
--- a/scripts/plot/scatter.m	Sat Jun 12 12:55:03 2010 -0400
+++ b/scripts/plot/scatter.m	Sat Jun 12 20:35:04 2010 -0400
@@ -96,3 +96,15 @@
 %! s = 10 - 10 * log (x.^2+y.^2);
 %! h = scatter (x, y, s, s, "s", "filled");
 
+%!demo
+%! x = rand (10, 1);
+%! y = rand (10, 1);
+%! s = 10 - 10 * log (x.^2+y.^2);
+%! h = scatter (x, y, [], "r", "s", "filled");
+
+%!demo
+%! x = rand (10, 1);
+%! y = rand (10, 1);
+%! s = 10 - 10 * log (x.^2+y.^2);
+%! h = scatter (x, y, [], "r", "s");
+