I have data in iPython DataFrame like this
Date X Y Z
0 2015-11-30 20:23:05.556 281.764900 -43.895060 8.714666
1 2015-11-30 20:23:05.757 192.519990 -44.636436 1.720552
2 2015-11-30 20:23:05.958 149.030600 -45.098050 1.958352
3 2015-11-30 20:23:06.171 140.707600 -44.622448 1.510729
4 2015-11-30 20:23:06.366 139.154890 -45.154003 4.783974
5 2015-11-30 20:23:06.564 138.875140 -44.790306 2.266093
The dtypes of the columns are these:
Date datetime64[ns]
X float64
Y float64
Z float64
dtype: object
I set the button_press_event to my fig like this
def onclick(event):
print 'button=%d, x=%d, y=%d, xdata=%s, ydata=%f'%(
event.button, event.x, event.y, event.xdata, event.ydata)
cid = fig.canvas.mpl_connect('button_press_event', onclick)
and I want to get data from x axes in Date format or String format, but after click in graph I have just this
button=1, x=152, y=339, xdata=735932.856811, ydata=8.518828
How to set output from xdata in String?