Hi:

I am trying to use the event associated to motion_notify_event in a 3D
plot, and I found that the event does not have the zdata property.

The following code illustrate the problem:

##################################
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt

def on_hover(event):
    print dir(event)

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
x = [1, 2, 3]
y = [1, 5, 4]
z = [3, 5, 6]
ax.scatter(x, y, z)

cid = fig.canvas.mpl_connect('motion_notify_event', on_hover)

plt.show()
##################################

When you move the mouse over the figure, you can see the properties of event:

['__doc__', '__init__', '__module__', '__str__',
'_update_enter_leave', 'button', 'canvas', 'dblclick', 'guiEvent',
'inaxes', 'key', 'lastevent', 'name', 'step', 'x', 'xdata', 'y',
'ydata']

There is xdata, ydata, but not zdata.

Is zdata missing or should I be using a different event type?

Alejandro.

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to