On 14/11/2014 15:49, Benjamin Root wrote:
> It is possible. Those examples were merely showing different ways to 
> do similar things (and there are more ways to do it, btw). The 
> techniques can be used for different artist types. I guess the 
> important question is, do you need the *exact* coordinates of the 
> artist, or just the coordinates where the mouse clicked? If it is just 
> the location of the mouse click, then the "xdata" and "ydata" 
> attributes should be all you need.
>
> For picking events, the event object will have an "artist" attribute 
> that will point to the artist that was "picked". For collection type 
> artists, there should be an "ind" attribute to the event object that 
> provides the index into the array held by the collection artist. You 
> can then index the data contained by the collection object already. 
> Different collection objects, unfortunately, have slightly different 
> getters. So, while some might have get_xdata() and get_ydata(), others 
> might have get_points() or something like that. I never get them 
> straight in my head.
>

yes, I know the exact coordinates of the marker. For lines is not a 
problem (using ind) but for a collection I have not found a built-in 
way. I have made a print(dir(artist)) and the only thing I found 
interesting was get_array(), but it gave me back None ...

Armando


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to