Mercurial > hg > octave-lyh
diff scripts/plot/scatter.m @ 13988:7ab497513c1a
Fix colour properties in scatter (bug #34936)
* __scatter_.m (render_size_color): Don't flatten c into a vector.
* scatter.m: Add another useful demo.
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Sun, 04 Dec 2011 11:01:19 -0500 |
parents | cd82f5933c73 |
children | 5f0bb45e615c |
line wrap: on
line diff
--- a/scripts/plot/scatter.m +++ b/scripts/plot/scatter.m @@ -115,3 +115,10 @@ %! s = 10 - 10*log (x.^2 + y.^2); %! h = scatter (x, y, [], "r", "s"); +%!demo +%! n = 500; +%! x = rand(n,1); +%! y = rand(n,1); +%! idx = ceil(rand(n,1)*3); +%! colors = eye(3)(idx, :); +%! scatter(x,y,15, colors, "filled") \ No newline at end of file