def OnConnect(self,event):
		self.ToggleTool(self._NTB2_PAN,False)
		self.ToggleTool(self._NTB2_ZOOM,False)
		if self._active=='PAN': NavigationToolbar2Wx.pan(self,event)
		if self._active=='ZOOM': NavigationToolbar2Wx.zoom(self,event)
		
		if self.GetToolState(self.IdConnect):
			if callable(self._connect): self._connect()
		else:
			if callable(self._disconnect): self._disconnect()
		if callable(self._getlim): self._getlim()
Exemple #2
0
 def pan(self, *args):
     try:
         #if self.VERSION[0]=='2' or self.VERSION[0]=='1':
         isPan = self._active == 'PAN'
     except:
         try:
             from matplotlib.backend_bases import _Mode
             isPan = self.mode == _Mode.PAN
         except:
             raise Exception(
                 'Pan not found, report a pyDatView bug, with matplotlib version.'
             )
     if isPan:
         NavigationToolbar2Wx.pan(self, *args)
         self.zoom()
     else:
         NavigationToolbar2Wx.pan(self, *args)
Exemple #3
0
 def pan(self, *args):
     if self.VERSION[0]=='2' or self.VERSION[0]=='1': 
         if self._active=='PAN':
             NavigationToolbar2Wx.pan(self,*args)
             self.zoom()
         else:
             NavigationToolbar2Wx.pan(self,*args)
     else: # 3
         from matplotlib.backend_bases import _Mode
         if self.mode == _Mode.PAN:
             NavigationToolbar2Wx.pan(self,*args)
             self.zoom()
         else:
             NavigationToolbar2Wx.pan(self,*args)
Exemple #4
0
 def pan(self, *args):
     if self._active == 'PAN':
         NavigationToolbar2Wx.pan(self, *args)
         self.zoom()
     else:
         NavigationToolbar2Wx.pan(self, *args)
	def pan(self,*args):
		# overriding pan method
		self.ToggleTool(self.IdConnect,False)
		if callable(self._disconnect): self._disconnect()
		NavigationToolbar2Wx.pan(self,*args)