Event handling

The scalar value of the picker is a epsilon tolerance in points (1
point = 1/72 inches) so you will need to set this distance to be small
enough to only overlap one point when you click.

If you want to only return a single point, you can write a custom
picker function to return only the point closest to the click point.

JDH

···

On Tue, Jan 27, 2009 at 8:18 AM, Nils Wagner <nwagner@...1052...> wrote:

Thank you very much for your response.
The horizontal distance between consecutive points is
5. in my application.

Is the value of picker linked to the distance ?
I mean
How should I use picker to circumvent multiple results ?

Unfortunately, I am not sure how to implement a custom picker function.

Any pointer would be appreciated.

Thanks in advance.

                        Nils

···

On Tue, 27 Jan 2009 08:57:17 -0600 John Hunter <jdh2358@...287...> wrote:

On Tue, Jan 27, 2009 at 8:18 AM, Nils Wagner > <nwagner@...1052...> wrote:

Thank you very much for your response.
The horizontal distance between consecutive points is
5. in my application.

Is the value of picker linked to the distance ?
I mean
How should I use picker to circumvent multiple results ?

The scalar value of the picker is a epsilon tolerance in points (1
point = 1/72 inches) so you will need to set this distance to be small
enough to only overlap one point when you click.

If you want to only return a single point, you can write a custom
picker function to return only the point closest to the click point.

The example I pointed you to in my first post has an example of a
custom picker function. It is in the section labelled "picking with a
custom hit test function"

  http://matplotlib.sourceforge.net/examples/event_handling/pick_event_demo.html

We've taken a lot of time to write the documentation and examples.
When you ask us questions on the mailing list and we point you to
documentation and examples, please take the time to read them. One
reason we wrote them is so that we would not have to continuously
solve the same problems over and over again on the mailing list. I'm
happy to help if you find the documentation or examples confusing, but
it will serve us both if you spend some time trying to digest them.

JDH

···

On Tue, Jan 27, 2009 at 9:27 AM, Nils Wagner <nwagner@...1052...> wrote:

If you want to only return a single point, you can write
a custom
picker function to return only the point closest to the
click point.

Unfortunately, I am not sure how to implement a custom
picker function.

Any pointer would be appreciated.