(self, fx0, fy0, fx1, fy1, cartesian=True)
Set the logical coordinate window (WINDOW).
Set the logical coordinate window (WINDOW).
Set the logical coordinate window ( WINDOW ) .
def _set_window(self, fx0, fy0, fx1, fy1, cartesian=True):
        """Set the logical coordinate window (WINDOW)."""
        if fy0 > fy1:
            fy0, fy1 = fy1, fy0
        if fx0 > fx1:
            fx0, fx1 = fx1, fx0
        if cartesian:
            fy0, fy1 = fy1, fy0
        x0, y0 = 0., 0.
        x1, y1 = self.graph_view.width-1, self.graph_view.height-1
        scalex = (x1-x0) / (fx1-fx0)
        scaley = (y1-y0) / (fy1-fy0)
        offsetx = x0 - fx0*scalex
        offsety = y0 - fy0*scaley
        self._window = scalex, scaley, offsetx, offsety
        self._window_bounds = fx0, fy0, fx1, fy1, cartesian
def _set_window ( self , fx0 , fy0 , fx1 , fy1 , cartesian = True ) : if fy0 > fy1 : fy0 , fy1 = fy1 , fy0 if fx0 > fx1 : fx0 , fx1 = fx1 , fx0 if cartesian : fy0 , fy1 = fy1 , fy0 x0 , y0 = 0. , 0. x1 , y1 = self . graph_view . width - 1 , self . graph_view . height - 1 scalex = ( x1 - x0 ) / ( fx1 - fx0 ) scaley = ( y1 - y0 ) / ( fy1 - fy0 ) offsetx = x0 - fx0 * scalex offsety = y0 - fy0 * scaley self . _window = scalex , scaley , offsetx , offsety self . _window_bounds = fx0 , fy0 , fx1 , fy1 , cartesian