Poor speed of wx.lib.plot

Hubbard, Gary wrote:
clip...

If I am completely off base about where the time is being consumed this kind
of change might not help at all, but other than the Win32 layers itself I
can't see anything else that could explain it.

Gary

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

.

If you find the DrawXXXList demo (under miscellaneous), run the line test. The demo draws 200 lines. On my machine (Athlon 3200, fx5900xt) I get .016 seconds. .016*25000/200 = 2 seconds, so that isn't too far off from your result. That demo does all kinds of wide lines, though...

Now to speed up your plotting, you might consider this: Usually you have a plot window which is at most 1000 pixels wide. You can't plot 25000 points without losing a lot of the original information. So why not use Numeric's slicing ability to take every, say, 4th point; xnew = x[::4]
You could write a little routine to pick the skip distance based on the length of the input vector. Just a thought...

Paul Probert