def METHOD_NAME(event):
    if event.inaxes != ax:
        return
    self.cur_xlim = ax.get_xlim()
    self.cur_ylim = ax.get_ylim()
    self.press = self.x0, self.y0, event.xdata, event.ydata
    self.x0, self.y0, self.xpress, self.ypress = self.press