def press_zoom(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() and a.can_zoom():<EOL><INDENT>self._xypress.append(( x, y, a, i, a.viewLim.frozen(), a.transData.frozen()))<EOL><DEDENT><DEDENT>self.press(event)<EOL>
the press mouse button in zoom to rect mode callback