def mouseMoveEvent(self, event): x = event.x() # flipy so y=0 is bottom of canvas y = self.figure.bbox.height - event.y() FigureCanvasAgg.motion_notify_event( self, x, y )