'process the figure/axes enter leave events'

def _update_enter_leave(self):

    if (LocationEvent.lastevent is not None):
        last = LocationEvent.lastevent
        if (last.inaxes != self.inaxes):
            try:
                if (last.inaxes is not None):
                    last.canvas.callbacks.process(u'axes_leave_event', last)
            except:
                pass
            if (self.inaxes is not None):
                self.canvas.callbacks.process(u'axes_enter_event', self)
    elif (self.inaxes is not None):
        self.canvas.callbacks.process(u'axes_enter_event', self)
    LocationEvent.lastevent = self
