[Matplotlib-users] detect mouse clicks

2014-04-21 Thread Michael Mossey
For my application which is a simple sound file editor written with matplotlib and PyQt4, I want to detect left and right clicks on the canvas. I need to know the data coordinates of the click (i.e., not where on the screen the click occurred, but what data point as defined by the axes it

Re: [Matplotlib-users] detect mouse clicks

2014-04-21 Thread Michael Mossey
Note: I'm looking at the Picker examples now and one problem I see is that I'm not asking the user to click on data points, but anywhere on the axes. On Mon, Apr 21, 2014 at 3:49 PM, Michael Mossey michaelmos...@gmail.comwrote: For my application which is a simple sound file editor written

Re: [Matplotlib-users] detect mouse clicks

2014-04-21 Thread Michael Mossey
Further update: I think I know how to do this. I can register a mouse event handler, and its xdata and ydata properties will tell me the data coordinates. On Mon, Apr 21, 2014 at 4:17 PM, Michael Mossey michaelmos...@gmail.comwrote: Note: I'm looking at the Picker examples now and one problem