code: def _onMotion(self, evt):
          
  
          x = evt.GetX()
          y = self.figure.bbox.height - evt.GetY()
          evt.Skip()
          FigureCanvasBase.motion_notify_event(self, x, y, guiEvent=evt)
docs: Start measuring on an axis.