From: Eric E. <ems...@ob...> - 2004-12-01 13:29:45
|
Hi, I am looking for a simple way to have a plot on which I can interact with a cursor. An example: - I have two plots on the same window and I wish to perform some action on these plots (change the scale, plot a different slice of an array, etc) depending on the pressed key and its location in the window. So if I am within the first plot, select the nearest point and redraw some info related to that point in the second plot (only when clicking with the left mouse button for example). If I type ''z'' (for zoom) then it is waiting for a second ''z'' interpreted as the 2 corners of a rectangle and a zoom is made for this region of the plot. I can do all this easily with ppgplot (pgplot module), but I failed to write something simple with matplotlib. So my questions: - is there a simple way to do this? (interact with the cursor, mouse/keyboard and retrieve the location so further actions can be taken) thanks a lot in advance Eric Emsellem |