|
From: Eric F. <ef...@ha...> - 2014-06-08 02:18:54
|
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 > > My goal is to have a custom function that will serve *both* purposes: > allow picking the markers only, not the line, of a set of data of any > length while returning the correct index of that marker/data point. But > the code in the custom function is mostly above my head, was written for > mpl 0.99 or so, and I don't know how to modify it to get both purposes > achieved. > > I attach the current sample again, with the problematic custom picker > function, "contains_points()". Thanks for any suggestions or help. > > 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |