Scatter is slow to render many points

Hi all,

I'm using matplotlib inside the backend_gtkagg with the scatter function to draw a simple graph with 20000 to 40000 points. The points may have only 2 differents sizes and 4 differents color depending on some criteria and should be 'clickable'.

The problem is that the plot rendering is very slow when it deals with ~10000 points, especially if we compare it with the rendering of the plot function using simple points (as the "data_browser.py" example)

Does anybody knows if there is a way to make things going a little bit faster?

Thanks,
Gregory

"plot" with markers is *much* faster than scatter. If you have only a
few different sizes and a few different colors, if you issue several
plot commands with one or more marker symbols

  plot(x1, y1, 'o', ms=10, color='red')
  plot(x2 y2, 's', ms=20, color='green')
  plot(x3, y3, '+', ms=8, color='blue')

It might be up to an order of magnitude faster. And the individual
points will be selectable using the pick events, as described in

  http://matplotlib.sourceforge.net/users/event_handling.html

Hope this helps,
JDH

···

On Wed, Nov 19, 2008 at 8:56 AM, Gregory Desvignes <Gregory.Desvignes@...2393...> wrote:

Hi all,

I'm using matplotlib inside the backend_gtkagg with the scatter function
to draw a simple graph with 20000 to 40000 points. The points may have
only 2 differents sizes and 4 differents color depending on some criteria
and should be 'clickable'.

The problem is that the plot rendering is very slow when it deals with
~10000 points, especially if we compare it with the rendering of the plot
function using simple points (as the "data_browser.py" example)

Does anybody knows if there is a way to make things going a little
bit faster?