@@ -330,18 +330,13 @@ scatterplot.draw(points);
330330
331331// You can now do something else like changing the point size etc.
332332
333- // Lets redraw the scatterplot. Since `draw` is caching the points you don't
334- // have to specify the points here again if they didn't change.
335- scatterplot .draw ();
336-
337333// If we want to animate the transition of our point from above to another
338334// x,y position, we can also do this by drawing a new point while enableing
339335// transition via the `options` argument.
340336scatterplot .draw ([[0.6 , 0.6 , 0 , 0.6 ]], { transition: true });
341337
342- // Lets actively unset the points. Since `draw()` assumes that you want to
343- // redraw existing points you have to actively pass in an empty array.
344- // Alternatively, call `scatterplot.clear()`
338+ // Let's unset the points. To do so, pass in an empty array to `draw()`.
339+ // Or alternatively, call `scatterplot.clear()`
345340scatterplot .draw ([]);
346341
347342// You can also specify the point data in a column-oriented format. The
@@ -361,6 +356,14 @@ scatterplot.draw(
361356);
362357```
363358
359+ <a name =" scatterplot.redraw " href =" #scatterplot.redraw " >#</a > scatterplot.<b >redraw</b >()
360+
361+ Redraw the scatter plot at the next animation frame.
362+
363+ Note, that regl-scatterlot automatically redraws the scatter plot whenever the
364+ view changes in some ways. So theoretically, there should never be a need to
365+ call this function!
366+
364367<a name =" scatterplot.clear " href =" #scatterplot.clear " >#</a > scatterplot.<b >clear</b >()
365368
366369Clears previously drawn points.
0 commit comments