'Connect press/release events and lock the canvas'

def enable(self, event):

    self.figure.canvas.widgetlock(self)
    self._idPress = self.figure.canvas.mpl_connect('button_press_event', self._press)
    self._idRelease = self.figure.canvas.mpl_connect('button_release_event', self._release)
    self._idScroll = self.figure.canvas.mpl_connect('scroll_event', self.scroll_zoom)
