Exemplo n.º 1
0
def init():
    global line_style_itr
    line_styles = object_set.T()
    for org_style in line_style.standards.objs:
        style = line_style.T(width = default_width, color = org_style.color,
                             dash = org_style.dash)
        line_styles.add(style)

    line_style_itr = line_styles.iterate()
Exemplo n.º 2
0
def init():
    global standards, _name_table
    standards = object_set.T()

    if theme.use_color:
        standards.add(black, red, darkblue, gray70, darkseagreen, darkkhaki,
                      gray30, black_dash1, red_dash1, darkblue_dash1,
                      gray70_dash1, darkseagreen_dash1, darkkhaki_dash1,
                      gray30_dash1, black_dash2, red_dash2, darkblue_dash2,
                      gray70_dash2, darkseagreen_dash2, darkkhaki_dash2,
                      gray30_dash2)
    else:
        standards.add(black, black_dash1, black_dash2, gray70, gray70_dash1,
                      gray70_dash2, gray10, gray10_dash1, gray10_dash2, gray50,
                      gray50_dash1, gray50_dash2, gray90, gray90_dash1,
                      gray90_dash2, gray30, gray30_dash1, gray30_dash2,
                      black_dash3, gray70_dash3, gray10_dash3, gray50_dash3,
                      gray90_dash3)
    for style in standards.list():
        style.width = theme.default_line_width
    _name_table = None
Exemplo n.º 3
0
def init():
    global standards, __name_table
    standards = object_set.T()

    if theme.use_color:
        standards.add(dodgerblue2, lightskyblue2, darkorange1, burlywood1,
                      seagreen3, darkseagreen1, red, darkblue, gray70,
                      darkseagreen, darkkhaki, gray30, black_dash1, red_dash1,
                      darkblue_dash1, gray70_dash1, darkseagreen_dash1,
                      darkkhaki_dash1, gray30_dash1, black_dash2, red_dash2,
                      darkblue_dash2, gray70_dash2, darkseagreen_dash2,
                      darkkhaki_dash2, gray30_dash2)

    else:
        standards.add(black, black_dash1, black_dash2, gray70, gray70_dash1,
                      gray70_dash2, gray10, gray10_dash1, gray10_dash2, gray50,
                      gray50_dash1, gray50_dash2, gray90, gray90_dash1,
                      gray90_dash2, gray30, gray30_dash1, gray30_dash2,
                      gray70_dash3, gray10_dash3, gray50_dash3, gray90_dash3)

    __name_table = None
Exemplo n.º 4
0
        "r" : (pychart_util.NumType, 0, 0.0, "The intensity of red. The value is between 0 and 1."),
        "g" : (pychart_util.NumType, 0, 0.0, "The intensity of green. The value is between 0 and 1."),
        "b" : (pychart_util.NumType, 0, 0.0, "The intensity of blue. The value is between 0 and 1.")
        }
##AUTOMATICALLY GENERATED
##END AUTOMATICALLY GENERATED
    def __str__(self):
        s = name_table().lookup(self)
        if s:
            return s
        if self.r == self.g and self.r == self.b:
            return "<color:grayscale=%f>" % self.r
        else:
            return "<color:r=%f,g=%f,b=%f>" % (self.r, self.g, self.b)
        
standards = object_set.T()
def __intern(r,g,b):
    c = T(r = r, g = g, b = b)
    standards.add(c)
    return c

def gray_scale(g):
    """Generate a grayscale color.T object. G=0 produces white, G=1.0
    produces black."""
    return T(r=g,g=g,b=g)

# generated automatically from rgb.txt

snow = __intern(r=1.000000,g=0.980392,b=0.980392)
ghostwhite = __intern(r=0.972549,g=0.972549,b=1.000000)
whitesmoke = __intern(r=0.960784,g=0.960784,b=0.960784)
Exemplo n.º 5
0
    keys = {
        "line_style": (line_style.T, line_style.default, ""),
        "fill_style": (fill_style.T, fill_style.gray70, ""),
        "center_line_style": (line_style.T, line_style.T(width=0.5), ""),
        "box_width": (UnitType, 4, ""),
    }

    ##AUTOMATICALLY GENERATED

    ##END AUTOMATICALLY GENERATED
    def draw(self, can, loc, min, max, qmin=None, qmax=None):
        x = loc[0]
        y = loc[1]

        can.rectangle(self.line_style, self.fill_style,
                      x - self.box_width / 2.0, min, x + self.box_width / 2.0,
                      max)
        can.line(self.center_line_style, x - self.box_width / 2.0,
                 (min + max) / 2.0, x + self.box_width / 2.0,
                 (min + max) / 2.0)


bar1 = error_bar1()
bar2 = error_bar2()
bar3 = error_bar3()
bar4 = error_bar4()
bar5 = error_bar5()
bar6 = error_bar6()

standards = object_set.T(bar1, bar2, bar3, bar4, bar5, bar6)
Exemplo n.º 6
0
        j = 0
        while cury < y2:
            curx = x1
            if j % 2 == 1:
                curx = curx + interval / 2.0
            while curx < x2:
                canvas.line(self.line_style, curx, cury, curx + interval / 2.0,
                            cury)
                curx = curx + interval * 1.5
            j = j + 1
            cury = cury + interval


default = Plain()

color_standards = object_set.T()
gray_standards = object_set.T()


def __intern_both(style):
    global color_standards, gray_standards
    color_standards.add(style)
    gray_standards.add(style)
    return style


def __intern_color(style):
    global color_standards, gray_standards
    color_standards.add(style)
    return style
Exemplo n.º 7
0
        interval = nscale(self.line_interval)
        cury = y1
        j = 0
        while cury < y2:
            curx = x1
            if j % 2 == 1:
                curx += interval/2.0
            while curx < x2:
                can.line(self.line_style, curx, cury, curx+interval/2.0, cury)
                curx += interval * 1.5
            j += 1
            cury += interval

default = Plain()

color_standards = object_set.T()
grayscale_standards = object_set.T()

def _intern_both(style):
    global color_standards, grayscale_standards
    color_standards.add(style)
    grayscale_standards.add(style)
    return style

def _intern_color(style):
    global color_standards, grayscale_standards    
    color_standards.add(style)
    return style

def _intern_grayscale(style):
    global color_standards, grayscale_standards