On Wed, Nov 19, 2008 at 8:56 AM, Gregory Desvignes <[EMAIL PROTECTED]> 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?
"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 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users