Bear in mind i am still new to python. I have a python code which plases a cursor on my waveform. I need to get x-axis in this case x=22:24:24
as shown on the attachment. But i am getting 1.4e+04 and i am conused as to where it is coming from. Since i am still new
i would prefer a clear answer as i dont understand deep programing. Here is the part that plot this figure
#This part lets the user correct the over estimated amplitude and returns the correct amplitude. User should click on the ampl
fig = plt.figure(figsize=(12, 14))
ax = fig.add_subplot(1, 1, 1)
ax.plot(tr5.times("matplotlib"), tr5.data, "green")
ax.xaxis.set_major_formatter(xFmt)
ax.grid()
#ax.xaxis_date()
fig.autofmt_xdate()
#defining the cursor
cursor = Cursor(ax, horizOn = True, vertOn=True, color='red', linewidth=1, useblit=True)
#Creating the annotation framework
annot = ax.annotate("", xy=(0,0), xytext=(-40,40),textcoords="offset points",
bbox=dict(boxstyle="round4", fc="grey", ec="k", lw=2),
arrowprops=dict(arrowstyle="-|>"))
annot.set_visible(False)
# Function for storing and showing the clicked values
coord = []
def onclick(event):
#global coord
coord.append(((event.xdata), event.ydata))
global x
x =event.xdata
global y
y = event.ydata
annot.xy = (x,y)
text = "({:.2g}, {:.2g})".format(x,y)
annot.set_text(text)
annot.set_visible(True)
ax.xaxis.set_major_formatter(xFmt)
fig.canvas.draw() #redraw the figure
fig.canvas.mpl_connect('button_press_event', onclick)
plt.xlabel('Time [hh:mm:ss]')
plt.show()