(self, parameter)
Zoom along the x,y coordinates.
        
        Arguments:
          * parameter: (dx, px, dy, py)
Zoom along the x,y coordinates.
        
        Arguments:
          * parameter: (dx, px, dy, py)
Zoom along the x y coordinates . Arguments : * parameter : ( dx px dy py )
def zoom(self, parameter):
        """Zoom along the x,y coordinates.
        
        Arguments:
          * parameter: (dx, px, dy, py)
        
        """
        dx, px, dy, py = parameter
        if self.parent.constrain_ratio:
            if (dx >= 0) and (dy >= 0):
                dx, dy = (max(dx, dy),) * 2
            elif (dx <= 0) and (dy <= 0):
                dx, dy = (min(dx, dy),) * 2
            else:
                dx = dy = 0
        self.sx *= np.exp(dx)
        self.sy *= np.exp(dy)
        
        # constrain scaling
        if self.constrain_navigation:
            self.sx = np.clip(self.sx, self.sxmin, self.sxmax)
            self.sy = np.clip(self.sy, self.symin, self.symax)
        
        self.tx += -px * (1./self.sxl - 1./self.sx)
        self.ty += -py * (1./self.syl - 1./self.sy)
        self.sxl = self.sx
        self.syl = self.sy
def zoom ( self , parameter ) : dx , px , dy , py = parameter if self . parent . constrain_ratio : if ( dx >= 0 ) and ( dy >= 0 ) : dx , dy = ( max ( dx , dy ) , ) * 2 elif ( dx <= 0 ) and ( dy <= 0 ) : dx , dy = ( min ( dx , dy ) , ) * 2 else : dx = dy = 0 self . sx *= np . exp ( dx ) self . sy *= np . exp ( dy ) # constrain scaling if self . constrain_navigation : self . sx = np . clip ( self . sx , self . sxmin , self . sxmax ) self . sy = np . clip ( self . sy , self . symin , self . symax ) self . tx += - px * ( 1. / self . sxl - 1. / self . sx ) self . ty += - py * ( 1. / self . syl - 1. / self . sy ) self . sxl = self . sx self . syl = self . sy