From: Werner S. <sm...@ia...> - 2009-08-28 18:05:52
|
Hi Brian, > > Thank you for your suggestion. I started off porting something like > wxPLplotstream.cpp to python, as you suggested. I had some quick > success with it so I am now working on a python class more like > wxPLplotwindow.cpp. It all seems to be working well, and I can even > use multiple streams to handle multiple plots simultaneously. Once I > get it in decent shape I will post it here. That would be perfect. I would happily add wxpython bindings to the plplot code - wxpython is quite important and having an offer for wxpython developers would be a good thing. > > I did need to make a couple of changes to plplotcapi.i so swig would > wrap pl_cmd() and PLESC_DEVINIT, since there were not part of the > bindings. Is there a chance that these could be exposed in the python > bindings in the next release of plplot? Sure, should be no problem. > I saw some problem with the > void* in pl_cmd() while trying to recompile all the bindings, but it > is OK with python. I don't know enough about swig or the other > languages to fix the problem there. Just post what you have and I'm sure that we are able do the rest, although I remember now, that void* is in principle a problem for python - but at least we could provide a (specialized) solution for the wxpython bindings or even put this solution into the wxpython bindings itself. > > I don't have a quantitative comparison yet, but it looks like plplot > is quite fast compared to the other options I have found for wxPython. PLplot is quite fast, I'm sure. Mind though, that the wxWidgets driver has 3 different backends: the wxDC backend which just uses the basic drawing functions of wxwidgets - the fastest, but not antialized. wxAGG backend, which needs the AGG library, fast (but slower as wxDC) and nice, but bad font handling. wxGC backend which uses the wxGraphicsContext class, it may be the slowest but nice antializing and best font drawing. I plan to improve the speed for shade plots soon and it's also possible to gain extra speed, since the wxWidgets driver in the moment updates the screen every 100 plot commands or so. Since most plots consists of some hundreds to thousands commands, there is also much room for improvement, if you really need speed. Thanks, Werner > > Thanks again, > Brian -- Dr. Werner Smekal Institut fuer Allgemeine Physik Technische Universitaet Wien Wiedner Hauptstr 8-10 A-1040 Wien Austria DVR-Nr: 0005886 email: sm...@ia... web: http://www.iap.tuwien.ac.at/~smekal phone: +43-(0)1-58801-13463 (office) +43-(0)1-58801-13469 (laboratory) fax: +43-(0)1-58801-13499 |