# HG changeset patch # User Markus Mützel # Date 1573982810 -3600 # Node ID fc8668e1cb263877722bed459db881d07328de8c # Parent 1a8fd58af587102175e6cf76167951a4cce4952b __scatter__.m: Use one single patch for large number of points (bug #40663). diff -r 1a8fd58af587 -r fc8668e1cb26 scripts/plot/draw/private/__scatter__.m --- a/scripts/plot/draw/private/__scatter__.m Sat Nov 30 22:49:26 2019 +0100 +++ b/scripts/plot/draw/private/__scatter__.m Sun Nov 17 10:26:50 2019 +0100 @@ -245,32 +245,10 @@ else - ## For larger numbers of points, we split the points by common color. - + ## For larger numbers of points, we use one single object. vert = [x, y, z]; - if (one_explicit_color) - render_size_color (hg, vert, s, c, marker, filled, true); - else - if (rows (c) == 1) - c = repmat (c, rows (x), 1); - endif - ## We want to group points by color. So first get all the unique colors - [cc, ~, c_to_cc] = unique (c, "rows"); + render_size_color (hg, vert, s, c, marker, filled, true); - for i = 1 : rows (cc) - ## Now for each possible unique color, get the logical index of - ## points that correspond to that color - idx = (i == c_to_cc); - if (isscalar (s)) - render_size_color (hg, vert(idx, :), s, c(idx,:), - marker, filled, true); - else - render_size_color (hg, vert(idx, :), s(idx), c(idx,:), - marker, filled, true); - endif - endfor - - endif endif if (! ischar (c) && rows (c) > 1)