[Numpy-discussion] numarray speed - PySequence_GetItem
jdhunter at ace.bsd.uchicago.edu
Fri Jun 25 14:37:11 CDT 2004
>>>>> "Sebastian" == Sebastian Haase <haase at msg.ucsf.edu> writes:
Sebastian> Hi, The long story is that I'm looking for a good/fast
Sebastian> graph plotting programs; so I found WxPyPlot
Sebastian> It uses wxPython and plots 25000 data points (with
Sebastian> lines + square markers) in under one second - using
Sebastian> Numeric that is.
Not an answer to your question ....
matplotlib has full numarray support (no need to rely on sequence
API). You need to set NUMERIX='numarray' in setup.py before building
it *and* set numerix : numarray in the matplotlib rc file. If you
don't do both of these things, your numarray performance will suffer,
With this test script
from matplotlib.matlab import *
N = 25000
x = rand(N)
y = rand(N)
You can do a scatter plot of squares, on my machine in under a second
using numarray (wxagg or agg backend). Some fairly recent changes to
matplotlib have moved this drawing into extension code, with an approx
10x performance boost from older versions. The latest version on the
sf site (0.54.2) however, does have these changes.
To plot markers with lines, you would need
instead of scatter. This is considerably slower (approx 3s on my
system), mainly because I haven't ported the new fast drawing of
marker code to the line class. This is an easy fix, however, and will
be added in short order.
More information about the Numpy-discussion