Logo Search packages:      
Sourcecode: python-biopython version File versions  Download package

def Bio::Graphics::BasicChromosome::ChromosomeSegment::_draw_label (   self,
  cur_drawing 
) [private]

Add a label to the chromosome segment.

Definition at line 367 of file BasicChromosome.py.

00367                                       :
        """Add a label to the chromosome segment.
        """
        # the label will be applied to the right of the segment
        if self.label is not None:

            label_x = self.start_x_position + \
                      (self.chr_percent + 0.05) * (self.end_x_position -
                                                   self.start_x_position)
            label_y = ((self.start_y_position - self.end_y_position) / 2 +
                       self.end_y_position)

            label_string = String(label_x, label_y, self.label)
            label_string.fontName = 'Helvetica'
            label_string.fontSize = self.label_size

            cur_drawing.add(label_string)
        
class TelomereSegment(ChromosomeSegment):


Generated by  Doxygen 1.6.0   Back to index