On Sat, Jun 7, 2014 at 10:18 PM, Eric Firing <efir...@hawaii.edu> wrote:

> On 2014/06/07, 4:12 PM, C M wrote:
> > I had been using a custom function (written originally by Jae-Joon and
> > modified a little by me...quite a long time back now) that was working
> > to allow point picking of markers, but *not* the line connecting them.
> > However, I've now discovered with the help of this list that the
> > function I am using has the disadvantage that if there are more than 100
> > data points, I can't get the correct index for the picked marker (turned
> > out not to be a mpl bug:
> > https://github.com/matplotlib/matplotlib/issues/3124).
> >
> > So I can just use the default pick event, but then the user can pick
> > anywhere on the connecting line, which is meaningless in this use--so I
> > don't want them to be able to pick on the connecting line.
>
> Why not just execute plot twice, once with the markers, with picking
> activated, and a second time with the line, with picking inactive (the
> default).
>
> Eric
>

That is so simple, and I hadn't thought of it at all.  Thank you!  My only
concerns would be for slowness of plotting if there are a lot of points and
just code simplicity, and so if there could be some other way with a custom
function for the picker that would do this, I would probably prefer that.
But maybe neither of these are particularly important concerns.

Che
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to