def METHOD_NAME(event):
    if self.press is None:
        return
    if event.inaxes != ax:
        return
    dx = event.xdata - self.xpress
    dy = event.ydata - self.ypress
    self.cur_xlim -= dx
    self.cur_ylim -= dy
    ax.set_xlim(self.cur_xlim)
    ax.set_ylim(self.cur_ylim)
    ax.figure.canvas.draw()