Re: [Matplotlib-users] event.ind in point picking gives wrong number

2014-06-07 Thread C M
On Sat, Jun 7, 2014 at 4:02 PM, Benjamin Root wrote: > Thanks for the example script. I think I have a clue now what is happening. > Thank you for the quick reply. > If one were to also print out the length of the "d" array, you will find > that it is significantly shorter than when you aren't

Re: [Matplotlib-users] event.ind in point picking gives wrong number

2014-06-07 Thread Benjamin Root
Thanks for the example script. I think I have a clue now what is happening. If one were to also print out the length of the "d" array, you will find that it is significantly shorter than when you aren't zoomed (I am getting a length of 7 when it should be 155). But it isn't truncated for the other

Re: [Matplotlib-users] event.ind in point picking gives wrong number

2014-06-07 Thread C M
Hello again. This is follow-up on this 9 month old thread (I left this issue for a while and am now returning to it). I upgraded to the latest stable version of Matplotlib, 1.3.1, and tested and I am still getting the exact same confusing problem. Now I also have a small runnable test script that

Re: [Matplotlib-users] event.ind in point picking gives wrong number

2013-09-16 Thread Benjamin Root
On Sun, Sep 15, 2013 at 11:59 PM, C M wrote: > Just a follow-up on this problem... > > I've found now that the index is only off if the plot is zoomed, and in > the following way. When I zoom, the first point that is visible in the > plot window will have index = 0, the next point will have inde

Re: [Matplotlib-users] event.ind in point picking gives wrong number

2013-09-15 Thread C M
Just a follow-up on this problem... I've found now that the index is only off if the plot is zoomed, and in the following way. When I zoom, the first point that is visible in the plot window will have index = 0, the next point will have index = 1, and so forth. If I zoom another section of the p

[Matplotlib-users] event.ind in point picking gives wrong number

2013-09-15 Thread C M
I have Matplotlib 1.1.0, and am doing point picking (using the OO approach to Matplotlib, and embedded in wxPython). My relevant code is as follows: #connect the pick event to the pick event handler: self.cid = self.canvas.mpl_connect('pick_event', self.on_pick) #This is the relevant part of the