Esempio n. 1
0
    def draw(self,
             format=None,
             pagesize=None,
             orientation=None,
             x=None,
             y=None,
             xl=None,
             xr=None,
             yt=None,
             yb=None,
             start=None,
             end=None,
             tracklines=None,
             fragments=None,
             fragment_size=None,
             track_size=None,
             circular=None):
        """ draw(self, format=None, pagesize=None, orientation=None,
            x=None, y=None, xl=None, xr=None, yt=None, yb=None,
            start=None, end=None, tracklines=None, fragments=None,
            fragment_size=None, track_size=None)

            Draws the diagram using the passed parameters, if any, to override
        previous settings for the diagram object.
        """
        # Pass the parameters to the drawer objects that will build the
        # diagrams.  At the moment, we detect overrides with an or in the
        # Instantiation arguments, but I suspect there's a neater way to do
        # this.
        if format == 'linear':
            drawer = LinearDrawer(
                self, pagesize or self.pagesize, orientation
                or self.orientation, x or self.x, y or self.y, xl or self.xl,
                xr or self.xr, yt or self.yt, yb or self.yb, start
                or self.start, end or self.end, tracklines or self.tracklines,
                fragments or self.fragments, fragment_size
                or self.fragment_size, track_size or self.track_size)
        else:
            drawer = CircularDrawer(
                self, pagesize or self.pagesize, orientation
                or self.orientation, x or self.x, y or self.y, xl or self.xl,
                xr or self.xr, yt or self.yt, yb or self.yb, start
                or self.start, end or self.end, tracklines or self.tracklines,
                track_size or self.track_size, circular or self.circular)
        drawer.draw()  # Tell the drawer to complete the drawing
        self.drawing = drawer.drawing  # Get the completed drawing
Esempio n. 2
0
 def draw(self,
          format=None,
          pagesize=None,
          orientation=None,
          x=None,
          y=None,
          xl=None,
          xr=None,
          yt=None,
          yb=None,
          start=None,
          end=None,
          tracklines=None,
          fragments=None,
          fragment_size=None,
          track_size=None,
          circular=None,
          circle_core=None,
          cross_track_links=None):
     """Draw the diagram, with passed parameters overriding existing attributes.
     """
     # Pass the parameters to the drawer objects that will build the
     # diagrams.  At the moment, we detect overrides with an or in the
     # Instantiation arguments, but I suspect there's a neater way to do
     # this.
     if format == 'linear':
         drawer = LinearDrawer(
             self, pagesize or self.pagesize, orientation
             or self.orientation, x or self.x, y or self.y, xl or self.xl,
             xr or self.xr, yt or self.yt, yb or self.yb, start
             or self.start, end or self.end, tracklines or self.tracklines,
             fragments or self.fragments, fragment_size
             or self.fragment_size, track_size or self.track_size,
             cross_track_links or self.cross_track_links)
     else:
         drawer = CircularDrawer(
             self, pagesize or self.pagesize, orientation
             or self.orientation, x or self.x, y or self.y, xl or self.xl,
             xr or self.xr, yt or self.yt, yb or self.yb, start
             or self.start, end or self.end, tracklines or self.tracklines,
             track_size or self.track_size, circular or self.circular,
             circle_core or self.circle_core, cross_track_links
             or self.cross_track_links)
     drawer.draw()  # Tell the drawer to complete the drawing
     self.drawing = drawer.drawing  # Get the completed drawing
Esempio n. 3
0
    def draw(self, format=None, pagesize=None, orientation=None,
             x=None, y=None, xl=None, xr=None, yt=None, yb=None,
             start=None, end=None, tracklines=None, fragments=None,
             fragment_size=None, track_size=None, circular=None):
        """ draw(self, format=None, pagesize=None, orientation=None,
            x=None, y=None, xl=None, xr=None, yt=None, yb=None,
            start=None, end=None, tracklines=None, fragments=None,
            fragment_size=None, track_size=None)

            Draws the diagram using the passed parameters, if any, to override
        previous settings for the diagram object.
        """
        # Pass the parameters to the drawer objects that will build the 
        # diagrams.  At the moment, we detect overrides with an or in the 
        # Instantiation arguments, but I suspect there's a neater way to do 
        # this.
        if format == 'linear':
            drawer = LinearDrawer(self, pagesize or self.pagesize, 
                                  orientation or self.orientation, 
                                  x or self.x, y or self.y, xl or self.xl, 
                                  xr or self.xr, yt or self.yt, 
                                  yb or self.yb, start or self.start, 
                                  end or self.end, 
                                  tracklines or self.tracklines,
                                  fragments or self.fragments, 
                                  fragment_size or self.fragment_size, 
                                  track_size or self.track_size)
        else:
            drawer = CircularDrawer(self, pagesize or self.pagesize, 
                                    orientation or self.orientation, 
                                    x or self.x, y or self.y, xl or self.xl, 
                                    xr or self.xr, yt or self.yt, 
                                    yb or self.yb, start or self.start, 
                                    end or self.end, 
                                    tracklines or self.tracklines,
                                    track_size or self.track_size,
                                    circular or self.circular)
        drawer.draw()   # Tell the drawer to complete the drawing
        self.drawing = drawer.drawing  # Get the completed drawing
Esempio n. 4
0
 def draw(self, format=None, pagesize=None, orientation=None,
          x=None, y=None, xl=None, xr=None, yt=None, yb=None,
          start=None, end=None, tracklines=None, fragments=None,
          fragment_size=None, track_size=None, circular=None,
          circle_core=None, cross_track_links=None):
     """Draw the diagram, with passed parameters overriding existing attributes.
     """
     # Pass the parameters to the drawer objects that will build the
     # diagrams.  At the moment, we detect overrides with an or in the
     # Instantiation arguments, but I suspect there's a neater way to do
     # this.
     if format == 'linear':
         drawer = LinearDrawer(self, pagesize or self.pagesize,
                               orientation or self.orientation,
                               x or self.x, y or self.y, xl or self.xl,
                               xr or self.xr, yt or self.yt,
                               yb or self.yb, start or self.start,
                               end or self.end,
                               tracklines or self.tracklines,
                               fragments or self.fragments,
                               fragment_size or self.fragment_size,
                               track_size or self.track_size,
                               cross_track_links or self.cross_track_links)
     else:
         drawer = CircularDrawer(self, pagesize or self.pagesize,
                                 orientation or self.orientation,
                                 x or self.x, y or self.y, xl or self.xl,
                                 xr or self.xr, yt or self.yt,
                                 yb or self.yb, start or self.start,
                                 end or self.end,
                                 tracklines or self.tracklines,
                                 track_size or self.track_size,
                                 circular or self.circular,
                                 circle_core or self.circle_core,
                                 cross_track_links or self.cross_track_links)
     drawer.draw()   # Tell the drawer to complete the drawing
     self.drawing = drawer.drawing  # Get the completed drawing