Mercurial > hg > octave-lojdl
changeset 9295:10b9a71a81f1
__scatter__.m: If the color spec is empty, set using __next_line_color__.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Wed, 03 Jun 2009 10:38:17 -0400 |
parents | f7a520eb6325 |
children | b41a7b2bd6fc |
files | scripts/ChangeLog scripts/plot/__scatter__.m scripts/plot/scatter3.m |
diffstat | 3 files changed, 30 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +2009-06-03 Ben Abbott <bpabbott@mac.com> + + * plot/__scatter__.m: If the color spec is empty, set using + __next_line_color__. + * plot/scatter3.m: Add demos. + 2009-06-03 Jaroslav Hajek <highegg@gmail.com> * polynomial/polyfit.m: Fix test.
--- 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};
--- 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"); + + +