def draw_scale(self, track):
    ' draw_scale(self, track) -> ([element, element,...], [element, element,...])\n\n            o track     Track object\n\n            Returns a tuple of (list of elements in the scale, list of labels\n            in the scale)\n        '
    scale_elements = []
    scale_labels = []
    if (not track.scale):
        return ([], [])
    (btm, ctr, top) = self.track_radii[self.current_track_level]
    trackheight = (top - ctr)
    if (self.sweep < 1):
        p = ArcPath(strokeColor=track.scale_color, fillColor=None)
        p.addArc(self.xcenter, self.ycenter, ctr, startangledegrees=(90 - (360 * self.sweep)), endangledegrees=90)
        scale_elements.append(p)
        del p
    else:
        scale_elements.append(Circle(self.xcenter, self.ycenter, ctr, strokeColor=track.scale_color, fillColor=None))
    if track.scale_ticks:
        ticklen = (track.scale_largeticks * trackheight)
        tickiterval = int(track.scale_largetick_interval)
        largeticks = [pos for pos in range((tickiterval * (self.start // tickiterval)), int(self.end), tickiterval) if (pos >= self.start)]
        for tickpos in largeticks:
            (tick, label) = self.draw_tick(tickpos, ctr, ticklen, track, track.scale_largetick_labels)
            scale_elements.append(tick)
            if (label is not None):
                scale_labels.append(label)
        ticklen = (track.scale_smallticks * trackheight)
        tickiterval = int(track.scale_smalltick_interval)
        smallticks = [pos for pos in range((tickiterval * (self.start // tickiterval)), int(self.end), tickiterval) if (pos >= self.start)]
        for tickpos in smallticks:
            (tick, label) = self.draw_tick(tickpos, ctr, ticklen, track, track.scale_smalltick_labels)
            scale_elements.append(tick)
            if (label is not None):
                scale_labels.append(label)
    if track.axis_labels:
        for set in track.get_sets():
            if (set.__class__ is GraphSet):
                for n in xrange(7):
                    angle = (n * 1.0471975511965976)
                    (ticksin, tickcos) = (sin(angle), cos(angle))
                    (x0, y0) = ((self.xcenter + (btm * ticksin)), (self.ycenter + (btm * tickcos)))
                    (x1, y1) = ((self.xcenter + (top * ticksin)), (self.ycenter + (top * tickcos)))
                    scale_elements.append(Line(x0, y0, x1, y1, strokeColor=track.scale_color))
                    graph_label_min = []
                    graph_label_max = []
                    graph_label_mid = []
                    for graph in set.get_graphs():
                        quartiles = graph.quartiles()
                        (minval, maxval) = (quartiles[0], quartiles[4])
                        if (graph.center is None):
                            midval = ((maxval + minval) / 2.0)
                            graph_label_min.append(('%.3f' % minval))
                            graph_label_max.append(('%.3f' % maxval))
                            graph_label_mid.append(('%.3f' % midval))
                        else:
                            diff = max((graph.center - minval), (maxval - graph.center))
                            minval = (graph.center - diff)
                            maxval = (graph.center + diff)
                            midval = graph.center
                            graph_label_mid.append(('%.3f' % midval))
                            graph_label_min.append(('%.3f' % minval))
                            graph_label_max.append(('%.3f' % maxval))
                    (xmid, ymid) = (((x0 + x1) / 2.0), ((y0 + y1) / 2.0))
                    for (limit, x, y) in [(graph_label_min, x0, y0), (graph_label_max, x1, y1), (graph_label_mid, xmid, ymid)]:
                        label = String(0, 0, ';'.join(limit), fontName=track.scale_font, fontSize=track.scale_fontsize, fillColor=track.scale_color)
                        label.textAnchor = 'middle'
                        labelgroup = Group(label)
                        labelgroup.transform = (tickcos, (- ticksin), ticksin, tickcos, x, y)
                        scale_labels.append(labelgroup)
    return (scale_elements, scale_labels)
draw_scale(self, track) -> ([element, element,...], [element, element,...])

o track     Track object

Returns a tuple of (list of elements in the scale, list of labels
in the scale)
def draw_scale(self, track):
    ' draw_scale(self, track) -> ([element, element,...], [element, element,...])\n\n            o track     Track object\n\n            Returns a tuple of (list of elements in the scale, list of labels\n            in the scale)\n        '
    scale_elements = []
    scale_labels = []
    if (not track.scale):
        return ([], [])
    (btm, ctr, top) = self.track_radii[self.current_track_level]
    trackheight = (top - ctr)
    if (self.sweep < 1):
        p = ArcPath(strokeColor=track.scale_color, fillColor=None)
        p.addArc(self.xcenter, self.ycenter, ctr, startangledegrees=(90 - (360 * self.sweep)), endangledegrees=90)
        scale_elements.append(p)
        del p
    else:
        scale_elements.append(Circle(self.xcenter, self.ycenter, ctr, strokeColor=track.scale_color, fillColor=None))
    if track.scale_ticks:
        ticklen = (track.scale_largeticks * trackheight)
        tickiterval = int(track.scale_largetick_interval)
        largeticks = [pos for pos in range((tickiterval * (self.start // tickiterval)), int(self.end), tickiterval) if (pos >= self.start)]
        for tickpos in largeticks:
            (tick, label) = self.draw_tick(tickpos, ctr, ticklen, track, track.scale_largetick_labels)
            scale_elements.append(tick)
            if (label is not None):
                scale_labels.append(label)
        ticklen = (track.scale_smallticks * trackheight)
        tickiterval = int(track.scale_smalltick_interval)
        smallticks = [pos for pos in range((tickiterval * (self.start // tickiterval)), int(self.end), tickiterval) if (pos >= self.start)]
        for tickpos in smallticks:
            (tick, label) = self.draw_tick(tickpos, ctr, ticklen, track, track.scale_smalltick_labels)
            scale_elements.append(tick)
            if (label is not None):
                scale_labels.append(label)
    if track.axis_labels:
        for set in track.get_sets():
            if (set.__class__ is GraphSet):
                for n in xrange(7):
                    angle = (n * 1.0471975511965976)
                    (ticksin, tickcos) = (sin(angle), cos(angle))
                    (x0, y0) = ((self.xcenter + (btm * ticksin)), (self.ycenter + (btm * tickcos)))
                    (x1, y1) = ((self.xcenter + (top * ticksin)), (self.ycenter + (top * tickcos)))
                    scale_elements.append(Line(x0, y0, x1, y1, strokeColor=track.scale_color))
                    graph_label_min = []
                    graph_label_max = []
                    graph_label_mid = []
                    for graph in set.get_graphs():
                        quartiles = graph.quartiles()
                        (minval, maxval) = (quartiles[0], quartiles[4])
                        if (graph.center is None):
                            midval = ((maxval + minval) / 2.0)
                            graph_label_min.append(('%.3f' % minval))
                            graph_label_max.append(('%.3f' % maxval))
                            graph_label_mid.append(('%.3f' % midval))
                        else:
                            diff = max((graph.center - minval), (maxval - graph.center))
                            minval = (graph.center - diff)
                            maxval = (graph.center + diff)
                            midval = graph.center
                            graph_label_mid.append(('%.3f' % midval))
                            graph_label_min.append(('%.3f' % minval))
                            graph_label_max.append(('%.3f' % maxval))
                    (xmid, ymid) = (((x0 + x1) / 2.0), ((y0 + y1) / 2.0))
                    for (limit, x, y) in [(graph_label_min, x0, y0), (graph_label_max, x1, y1), (graph_label_mid, xmid, ymid)]:
                        label = String(0, 0, ';'.join(limit), fontName=track.scale_font, fontSize=track.scale_fontsize, fillColor=track.scale_color)
                        label.textAnchor = 'middle'
                        labelgroup = Group(label)
                        labelgroup.transform = (tickcos, (- ticksin), ticksin, tickcos, x, y)
                        scale_labels.append(labelgroup)
    return (scale_elements, scale_labels)