예제 #1
0
        #f = faces.AttrFace("name", fsize=random.randint(20,20))
        faces.add_face_to_node(f, node, 0, position="aligned")
        f.border.width = 0
        #f = faces.CircleFace(20, "red")
        #f = faces.AttrFace("name", fsize=20)
        f = faces.TextFace("NAME", fsize=10)
        #faces.add_face_to_node(f, node, 0, position="branch-right")
        f.border.width = 0
    #node.img_style["bgcolor"] = random_color()

#Tree().show()
ts = TreeStyle()
ts.mode = "c"
ts.layout_fn = layout 
ts.show_leaf_name = False
ts.arc_span = 340
ts.arc_start = -70
#ts.allow_face_overlap = True
#ts.show_branch_length = True
ts.draw_guiding_lines = False
ts.optimal_scale_level = "mid"
ts.extra_branch_line_color = "red"
ts.root_opening_factor = 0.50
ts.show_border = True
ts.scale = None
t = Tree()
t.populate(200, random_branches=True, branch_range=(0, 0))
t.dist = 0.0
dists = [n.dist for n in t.traverse() if n.dist != 0]
#print max(dists), min(dists)
t.write(outfile="test.nw")
예제 #2
0
        #faces.add_face_to_node(f, node, 0, position="branch-right")
        f.border.width = 0
        
        node.img_style["size"] = 10
        node.img_style["shape"] = "square"
    node.img_style["bgcolor"] = random_color()
    node.img_style["hz_line_width"] = 0
    node.img_style["vt_line_width"] = 0
    #if node.is_leaf():
    #    f = faces.CircleFace(50, "red")
    #    faces.add_face_to_node(f, node, 0, position="aligned")
        

ts = TreeStyle()
ts.mode = "c"
ts.arc_span = 360
ts.layout_fn = layout 
ts.show_leaf_name = False
ts.show_border = True
ts.draw_guiding_lines = False
ts.show_scale = True
#ts.scale = 60
t = Tree()
t.dist = 0

t.size = 0,0
for x in xrange(100):
    n = t.add_child()
    n = n.add_child()
    n = n.add_child()
    n2 = n.add_child()
예제 #3
0
        #faces.add_face_to_node(f, node, 0, position="branch-right")
        f.border.width = 0

        node.img_style["size"] = 10
        node.img_style["shape"] = "square"
    node.img_style["bgcolor"] = random_color()
    node.img_style["hz_line_width"] = 0
    node.img_style["vt_line_width"] = 0
    #if node.is_leaf():
    #    f = faces.CircleFace(50, "red")
    #    faces.add_face_to_node(f, node, 0, position="aligned")


ts = TreeStyle()
ts.mode = "c"
ts.arc_span = 360
ts.layout_fn = layout
ts.show_leaf_name = False
ts.show_border = True
ts.draw_guiding_lines = False
ts.show_scale = True
#ts.scale = 60
t = Tree()
t.dist = 0

t.size = 0, 0
for x in xrange(100):
    n = t.add_child()
    n = n.add_child()
    n = n.add_child()
    n2 = n.add_child()
예제 #4
0
        faces.add_face_to_node(f, node, 0, position="aligned")
        f.border.width = 0
        # f = faces.CircleFace(20, "red")
        # f = faces.AttrFace("name", fsize=20)
        f = faces.TextFace("NAME", fsize=10)
        # faces.add_face_to_node(f, node, 0, position="branch-right")
        f.border.width = 0
    # node.img_style["bgcolor"] = random_color()


# Tree().show()
ts = TreeStyle()
ts.mode = "c"
ts.layout_fn = layout
ts.show_leaf_name = False
ts.arc_span = 340
ts.arc_start = -70
# ts.allow_face_overlap = True
# ts.show_branch_length = True
ts.draw_guiding_lines = False
ts.optimal_scale_level = "mid"
ts.extra_branch_line_color = "red"
ts.root_opening_factor = 0.50
ts.show_border = True
ts.scale = None
t = Tree()
t.populate(200, random_branches=True, branch_range=(0, 0))
t.dist = 0.0
dists = [n.dist for n in t.traverse() if n.dist != 0]
# print max(dists), min(dists)
t.write(outfile="test.nw")