# HG changeset patch # User Ben Abbott # Date 1244039897 14400 # Node ID b6a163a356a23f64ec5face40ada9e5da49c3c7d # Parent de6919e0c0f3ef2e320e183112bbb4b759c4a7a5 __scatter__.m: If the color spec is empty, set using __next_line_color__. diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +2009-06-03 Ben Abbott + + * plot/__scatter__.m: If the color spec is empty, set using + __next_line_color__. + * plot/scatter3.m: Add demos. + 2009-05-25 Jaroslav Hajek Version 3.2.0 released. diff --git a/scripts/plot/__scatter__.m b/scripts/plot/__scatter__.m --- a/scripts/plot/__scatter__.m +++ b/scripts/plot/__scatter__.m @@ -74,6 +74,9 @@ else c = c(:); endif + elseif (isempty (c)) + cc = __next_line_color__(); + c = repmat (cc, numel(x), 1); endif elseif (firstnonnumeric == istart + 1 && ischar (varargin{istart + 1})) c = varargin{istart + 1}; diff --git a/scripts/plot/scatter3.m b/scripts/plot/scatter3.m --- a/scripts/plot/scatter3.m +++ b/scripts/plot/scatter3.m @@ -83,3 +83,24 @@ %!demo %! [x, y, z] = peaks (20); %! scatter3 (x(:), y(:), z(:), [], z(:)); + +%!demo +%! x = rand (20,1); +%! y = rand (20,1); +%! z = rand (20,1); +%! scatter3 (x(:), y(:), z(:), 10, z(:), "s"); + +%!demo +%! x = rand (20,1); +%! y = rand (20,1); +%! z = rand (20,1); +%! scatter3 (x(:), y(:), z(:), 20*z(:), z(:), "s"); + +%!demo +%! x = rand (20,1); +%! y = rand (20,1); +%! z = rand (20,1); +%! scatter3 (x(:), y(:), z(:), 20*z(:), [], "s"); + + +