From: Bruce S. <bas...@un...> - 2003-01-19 14:51:27
|
It would not be difficult to add mouse interactivity to the visual.graph module, since that module was written completely in Python (by me), and anyone (including you) could easily add the mouse functionality you usefully suggest. See the file "graph" in the visual directory. Points 2 and 3 are more difficult. I've never been happy with the only way I could plot dots in visual.graph using the existing Visual module. I'm plotting the letter "o" using a label object. This is presumably expensive in time, and I'm not terribly surprised to learn that there is some limit on the number of dots to display, although I wasn't aware of it. (I'd be interested to have a test routine that illustrates this problem, though.) I couldn't plot a circle or a disk for a data point, because the graph axes are not uniform (different in x and y), and a circle or disk object comes out elliptical. There's also the problem of positioning the "o" with its center correctly placed. Not a satisfactory situation, and you're right to point out the failings. Perhaps what is needed is to introduce into Visual some object such as "dot" that has a fixed circular form independent of scaling. It is also conceivable that one might make creative use of the faces object (which I think was introduced by Dave Scherer long after I'd originally written the graph module). It would be necessary every time the graph scaling changes to run through the list of dots and re-do the faces specifications. But getting away from using a font-based label would be good. This would also permit different shapes (e.g. squares and triangles). Bruce Sherwood ----- Original Message ----- From: <ba...@ph...> > 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... > )) |