From: Gary <pa...@in...> - 2004-09-21 13:37:51
|
Hans Fangohr wrote: > Dear all, I am trying to use gcurve to continuously display the last N > points of a scalar function. More concrete: a simulation goes through > a number of iterations and for each iteration, I'd like to plot one > scalar value. I want to display the last N points using gcurve. I'm not exactly sure what you are trying to achieve, but I have something that seems similar. I wanted a stripchart... somthing that displays the latest data, while the older data falls off of the other end. Pmw.Blt has a stripchart. So I married Pmw.Blt and Vpython. An early demo is here: http://enigma.rider.edu/~gpajer/python.htm (IT is warning us that this server may disappear soon ... so don't delay!) since then I've spruced it up a bit, but this example displays various little features. The code is a bit hard to read ... sorry about that. It is also possible to make a stripchart using matplotlib (matplotlib.sf.net) . It's much slower (see below). Blt seems no longer supported or developed, but it works. A shame ... it has some nice features. For some reason, it is hard to install. I can attest that Pmw.Blt *does* work on Windows, OS X, and Linux. Windows instructions are on my weblink above. On OS X, it installs and runs readily using fink. Because of a bug in the configure script, Linux requires an environment variable ... can't recall it right now. I'll get it later if anyone wants it. [commercial break: nothing against matplotlib!!! I find that the combination of ipython/scipy/matplotlib/Vpython plus the non-pythonic Maxima makes a powerhouse of a scientific package. More functionality than Matlab or Mathematica at none of the price. And better support :) ] -gary |