def press_pan(self, event):
if event.button == <NUM_LIT:1>:<EOL><INDENT>self._button_pressed=<NUM_LIT:1><EOL><DEDENT>elif  event.button == <NUM_LIT:3>:<EOL><INDENT>self._button_pressed=<NUM_LIT:3><EOL><DEDENT>else:<EOL><INDENT>self._button_pressed=None<EOL>return<EOL><DEDENT>x, y = event.x, event.y<EOL>if self._views.empty(): self.push_current()<EOL>self._xypress=[]<EOL>for i, a in enumerate(self.canvas.figure.get_axes()):<EOL><INDENT>if x is not None and y is not None and a.in_axes(event) and a.get_navigate():<EOL><INDENT>a.start_pan(x, y, event.button)<EOL>self._xypress.append((a, i))<EOL>self.canvas.mpl_disconnect(self._idDrag)<EOL>self._idDrag=self.canvas.mpl_connect('<STR_LIT>', self.drag_pan)<EOL><DEDENT><DEDENT>self.press(event)<EOL>
the press mouse button in pan/zoom mode callback