From: <ba...@ph...> - 2003-01-19 09:55:37
|
Hi, thank you very much for your rapid response. I redid the compilation on my home machine (with Python 2.2.1c2 (#1, Apr 4 2002, 18:54:47) [GCC 2.95.4 20011006 (Debian prerelease)] on linux2 ) and had no problems. Everything seems to work fine. Unfortunately, it seems that Visual does not have all the capabilities I am looking for. Namely, I have the following issues 1.) There seems to be no possibility to use the mouse in 2D plots (visual.graph), namely to get its current position. 2.) When plotting many individual points with dots.plot(gdisplay=graph,pos=(x,y)) it seems that somehow after too many have been plotted, no further ones will be shown, Also I am a bit unsure about the speed (well, at home I have an old PII, 350MHz ... ;-) 3.) I did not figure out how to change the style and size of the plot points (but that's only a minor point to the above). Clearly, Visual is more aimed at 3D than 2D, but I haven't found a good 2D graphics display which allows for dynamic display from within python + mouse interaction/events. In particular, I really like the compactness in Visual, just three short commands do the job (gdisplay, dots=gdots, dots.plot) to get a plot. Are there any plans to realize 1.)-3.), or are they already there and I just overlooked it ?? ((Background Info: we are presently considering to use Python+Numeric together with some good graphics add-on for a course on computational physics next summer term. One crucial aspect for the choice of programming language/system is dynamic display of data + interactive aspects via mouse ... Any pointers are appreciated... )) Many thanks, Arnd On Fri, 17 Jan 2003, Andy Dougherty wrote: > On Fri, 17 Jan 2003 ba...@ph... wrote: > > > I tried to install VPython-2002-07-22.tar.gz on a > > debian woody machine, and ran into the following error message: > > > > g++ -I. -I./CXX/Include -I/home/abaecker/PYTHON/include/python2.3 > > -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include > > -D_REENTRANT -I/usr/X11R6/include -w -c -o platlinux.o platlinux.cpp > > platlinux.cpp:71: `ANY' was not declared in this scope > > platlinux.cpp:71: parse error before `)' > > make: *** [platlinux.o] Error 1 > > I compiled it just fine on a Debian woody machine. One difference is that > I used python 2.2.2, not python 2.3. I suspect the 2.3 version of python > is what's causing your problem. Go back and install 2.2.2 (or > something similar to that) and you should be fine. > > > gcc version 2.95.4 20011002 (Debian prerelease) > > I'm using the same one. > > > P.S.: g++3.2 even fails earlier: > > > > g++-3.2 -I. -I./CXX/Include -I/home/abaecker/PYTHON/include/python2.3 > > -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include > > -D_REENTRANT -I/usr/X11R6/include -w -c -o arrow.o arrow.cpp > > In file included from pvector.h:6, > > from cvisual.h:6, > > from display.h:5, > > from prim.h:5, > > from axial.h:5, > > from arrow.cpp:1: > > CXX/Include/CXX_Objects.h:967: no class template named > > `random_access_iterator' > > in `std' > > Yes, that's been reported before, and I think there's an #ifdef somewhere > in the visual sources. [poking around...] > > If, for some reason, you don't want to take my advice above and use > python-2.2.2, then you can try getting around this particular problem > by changing the line in cvisual/CXX/Include/CXX_Config.h that says > > #define STANDARD_LIBRARY_HAS_ITERATOR_TRAITS 1 > to > #define STANDARD_LIBRARY_HAS_ITERATOR_TRAITS 0 > > and see what happens. > If that doesn't work, try searching the archives of this group -- I > know this problem has been reported before. > > More generally, this should ultimately probably be fixed in the cvisual > sources, but I'm not sufficiently familiar with C++ myself to suggest > a fix. Checking out the stl_iterator documentation, I find this about > random_access_iterator: > > Defined in the standard header iterator, and in the nonstandard > backward-compatibility header iterator.h. This class is no longer part > of the C++ standard, although it was present in early drafts of the > standard. It is retained in this implementation for backward > compatibility. > > And the header file stl_iterator.h has these lines (at least in my version): > > // The base classes input_iterator, output_iterator, forward_iterator, > // bidirectional_iterator, and random_access_iterator are not part of > // the C++ standard. (they have been replaced by struct iterator.) > // They are included for backward compatibility with the HP STL. > > So it looks like cvisual has run into the problem of shifting > standards :-(. > > Anyway, using gcc-2.95 and python-2.2.2 should just work. Unless > you've got a sense of adventure, I'd try that combination first :-). > > Hope this helps, > > Andy Dougherty dou...@la... > Dept. of Physics > Lafayette College, Easton PA 18042 > > > |