def drag_pan(self, event): """ Callback for mouse motion in pan mode """ NavigationToolbar.drag_pan(self, event) if event.button == 3: self.plot.set_right_click_zoomed()