(self, x0, y0, x1, y1)
Set the view box in the window coordinate system.
        
        Arguments:
          * x0, y0, x1, y1: viewbox coordinates in the window coordinate system.
            These coordinates are all in [-1, 1].
Set the view box in the window coordinate system.
        
        Arguments:
          * x0, y0, x1, y1: viewbox coordinates in the window coordinate system.
            These coordinates are all in [-1, 1].
Set the view box in the window coordinate system . Arguments : * x0 y0 x1 y1 : viewbox coordinates in the window coordinate system . These coordinates are all in [ - 1 1 ] .
def set_relative_viewbox(self, x0, y0, x1, y1):
        """Set the view box in the window coordinate system.
        
        Arguments:
          * x0, y0, x1, y1: viewbox coordinates in the window coordinate system.
            These coordinates are all in [-1, 1].
        
        """
        # prevent too small zoombox
        if (np.abs(x1 - x0) < .07) & (np.abs(y1 - y0) < .07):
            return
        # force the zoombox to keep its original ratio
        if self.parent.constrain_ratio:
            x0, y0, x1, y1 = self.constrain_viewbox(x0, y0, x1, y1)
        if (x1-x0) and (y1-y0):
            self.tx += -(x1+x0)/(2*self.sx)
            self.ty += -(y1+y0)/(2*self.sy)
            self.sx *= 2./abs(x1-x0)
            self.sy *= 2./abs(y1-y0)
            self.sxl, self.syl = self.sx, self.sy
def set_relative_viewbox ( self , x0 , y0 , x1 , y1 ) : # prevent too small zoombox if ( np . abs ( x1 - x0 ) < .07 ) & ( np . abs ( y1 - y0 ) < .07 ) : return # force the zoombox to keep its original ratio if self . parent . constrain_ratio : x0 , y0 , x1 , y1 = self . constrain_viewbox ( x0 , y0 , x1 , y1 ) if ( x1 - x0 ) and ( y1 - y0 ) : self . tx += - ( x1 + x0 ) / ( 2 * self . sx ) self . ty += - ( y1 + y0 ) / ( 2 * self . sy ) self . sx *= 2. / abs ( x1 - x0 ) self . sy *= 2. / abs ( y1 - y0 ) self . sxl , self . syl = self . sx , self . sy