|
From: Sven D. <du...@as...> - 2011-12-07 01:36:01
|
Hi,
I kind of got the basic functionality working using
cid = self.fig.canvas.mpl_connect('motion_notify_event',
self.update_marker)
def update_marker(self, event):
print "plotMarker()" # DEBUG
self.marker=self.ax1
#print 'button=%d, x=%d, y=%d, xdata=%f, ydata=%f'%(
# event.button, event.x, event.y, event.xdata, event.ydata)
# DEBUG
self.ax1.axvline(x=event.xdata, linewidth=1, color='r')
self.canvas.draw() # redraw
but I still have the problem that previous lines still appear on the
plot.
Also, canvas.draw() seems to be a bit of a performance hog. Does anyone
have
any more sophisticated solution to this?
Cheers,
Sven
|