[off topic] Re: [Numpy-discussion] numarray speed - PySequence_GetItem

Sebastian Haase haase at msg.ucsf.edu
Fri Jun 25 15:34:01 CDT 2004


Hi John,
I wanted to try matplotlib a few days ago, but first I had some trouble 
compiling it (my debian still uses gcc 2-95, which doesn't understand some 
'std' namespace/template stuff) - and then it compiled, but segfaulted.
Maybe I didn't get "set NUMERIX" stuff right - how do I know that it actually 
built _and_ uses the wx-backend ?

BTW, from the profiling/timing I did you can tell that wxPyPlot actually plots 
25000 data points in 0.1 secs - so it's _really_ fast ...
So it would be nice to get to the ground of this ...

Thanks for the comment,
Sebastian


On Friday 25 June 2004 02:12 pm, John Hunter wrote:
> >>>>> "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> (http://www.cyberus.ca/~g_will/wxPython/wxpyplot.html)
>     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,
> sometimes dramatically.
>
> With this test script
>
>     from matplotlib.matlab import *
>     N = 25000
>     x = rand(N)
>     y = rand(N)
>     scatter(x,y, marker='s')
>     #savefig('test')
>     show()
>
> 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
>
>   plot(x,y, marker='-s')
>
> 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.
>
> JDH
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by Black Hat Briefings & Training.
> Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
> digital self defense, top technical experts, no vendor pitches,
> unmatched networking opportunities. Visit www.blackhat.com
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion




More information about the Numpy-discussion mailing list