I'm having trouble using picker on a scatter plots with various markers
(e.g. + and x). It works with the plot command fine. What am I missing?
Sample code below.

import numpy
import pylab

def onpick(event):
    print 'Pick:',event.ind

fig = pylab.figure()
ax = fig.add_subplot(111)

x1,y1 = numpy.random.random((2,100))
series1=ax.plot(x1,y1,marker='x',color='b',linestyle='',label='plot',picker=5)
x2,y2 = numpy.random.random((2,100))
series2=ax.scatter(x2,y2,marker='x',color='g',label='scatter-X',picker=5)
x3,y3 = numpy.random.random((2,100))
series3=ax.scatter(x3,y3,marker='o',color='r',label='scatter-O',picker=5)

fig.canvas.mpl_connect('pick_event',onpick)
pylab.legend()
pylab.show()
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to