speed of "simple plots" (using wx)

Hi,
I am still using the old "plt" package that used to be part of SciPy (
I fixed it up, kept it alive and it runs now fine with numpy).
I would really like to switch to matplotlib (using the wx backend) but
I'm having concerns regarding speed.

So I was wondering what are other people's speed benchmarks are like
-- to do something like a simple

a = numpy.arange(500)
mpl.plot(a)

I timed it and it took something like 50ms for a repeat of the plot command.
With my plt plotting package it is probably 10-50x faster.

I want to interactively plot and update (using the clear and plot
commands) things like image "line profiles" i.e. 512 points graphs.
Another example is that I started playing with ODEs (like
http://www.scipy.org/LoktaVolterraTutorial) and tried to make a small
gui to (like a Trait slider) for some parameters and the plotting
would make it completely unresponsive (plt worked again very fast --
super ugly, but fast :wink: )

Is there a special way to update plots very fast, i.e. faster than
clr();plot(...) ?

Regards,
Sebastian Haase

Sebastian Haase wrote:

Hi,
I am still using the old "plt" package that used to be part of SciPy (
I fixed it up, kept it alive and it runs now fine with numpy).
I would really like to switch to matplotlib (using the wx backend) but
I'm having concerns regarding speed.

So I was wondering what are other people's speed benchmarks are like
-- to do something like a simple

a = numpy.arange(500)
mpl.plot(a)

I timed it and it took something like 50ms for a repeat of the plot command.
With my plt plotting package it is probably 10-50x faster.

I want to interactively plot and update (using the clear and plot
commands) things like image "line profiles" i.e. 512 points graphs.
Another example is that I started playing with ODEs (like
http://www.scipy.org/LoktaVolterraTutorial) and tried to make a small
gui to (like a Trait slider) for some parameters and the plotting
would make it completely unresponsive (plt worked again very fast --
super ugly, but fast :wink: )

Is there a special way to update plots very fast, i.e. faster than
clr();plot(...) ?

I would not say "very fast", but check out the animation examples here:
http://matplotlib.sourceforge.net/examples/index.html.

Eric