Hi Ken,
[...]
I will resubmit the wx-anim.tar.gz patch to sourceforge with this
correction.
Many thanks for the update of the patch.
It turned out that I could not apply it to this mornings CVS checkout
because John's time machine was already active and he has put your
patch into CVS
During installation I encountered two glitches:
a) debian problem:
Very interestingly debian stable (sarge)
does not have wxPython.h
As a work-around I downloaded the corresponding source from debian
wget
http://ftp.debian.org/debian/pool/main/w/wxwindows2.4/wxwindows2.4_2.4.3.1.tar.gz
and copied all header files wxwindows2.4-2.4.3.1/wxPython/src/*.h
to a (newly created) /usr/include/wx/wxPython.
Then the installation went fine.
b) CVS problem:
Calling python animation_blit_wx.py from the examples directory
gives the error
lib/python2.3/site-packages/matplotlib/__init__.py:788: UserWarning:
could not find rc file; returning defaults
warnings.warn(message)
Traceback (most recent call last):
File "animation_blit_wx.py", line 10, in ?
import pylab as p
File "/scratch/abaecker/SOFT//lib/python2.3/site-packages/pylab.py",
line 1, in ?
from matplotlib.pylab import *
File
"/scratch/abaecker/SOFT//lib/python2.3/site-packages/matplotlib/pylab.py",
line 194, in ?
import cm
File
"/scratch/abaecker/SOFT//lib/python2.3/site-packages/matplotlib/cm.py",
line 372, in ?
atad['Blues']=_Blues_data
NameError: name '_Blues_data' is not defined
Commenting out the corresponding block in matplotlib/cm.py
everything works fine again
(John: I think this is a leftover from rev. 1.19 for cm.py "removed
extra cmaps until license is resolved")
OK, now to the new WXAgg (and animation in general):
Running:
python animation_blit.py
python animation_blit_tk.py
python animation_blit_wx.py
python animation_blit_wx.py --no-accel
gives:
GTKAgg FPS: 131.897223221
TkAgg FPS: 65.5153012595
WXAgg FPS: 100.55
(200 frames: 1.99 seconds, 200 blits: 0.95 seconds)
(FPS: 100.55 BPS: 211.00)
WXAgg --no-accel FPS: 53.21
(200 frames: 3.76 seconds, 200 blits: 2.55 seconds
(FPS: 53.21 BPS: 78.40)
I am running debian sarge, on a PIV, 2.8 GHz and an nVdia Quadro4 NVS
graphics card (@1600x1200).
So WXAgg is almost on par with GTGAgg - great!!
Ken, in _wxagg.cpp you mention that
you planned to write a agg_to_wx_bitmap() which
draws directly to a bitmap, but that
this might not speed up things much because
of: AGG->wx.Image->wx.Bitmap before you can blit using a MemoryDC.
Maybe you can contact Chris Barker if he has an idea on this
(or are there any solutions available in the context of wxart2d or
chaco? - quick googling did not reveal anything ...)
Anyway, the speed provided by the animate option
is a fantastic improvement - many thanks John and Ken!!
Just for comparison:
for backend in `echo "Tk TkAgg GTK GTKAgg WX WXAgg"`
do
echo $backend
python anim.py -d${backend}
done
Tk FPS: 35.5331434162
TkAgg FPS: 20.3487964649
GTK FPS: 35.528699289
GTKAgg FPS: 26.9074415174
WX FPS: 13.7550465745
WXAgg FPS: 26.0163513384
Many thanks,
Arnd
路路路
On Mon, 29 Aug 2005, Ken McIvor wrote: