def assign_vertices(self):
<EOL>uselen = bool(self.ttree.style.use_edge_lengths)<EOL>nidx = <NUM_LIT:0><EOL>for node in self.ttree.treenode.traverse("<STR_LIT>"):            <EOL><INDENT>if not node.is_root():<EOL><INDENT>self.edges[nidx, :] = [node.up.idx, node.idx]<EOL>nidx += <NUM_LIT:1><EOL><DEDENT><DEDENT>_root = self.ttree.treenode.get_tree_root()<EOL>_treeheight = _root.get_distance(_root.get_farthest_leaf()[<NUM_LIT:0>])<EOL>tidx = len(self.ttree) - <NUM_LIT:1><EOL>for node in self.ttree.treenode.traverse("<STR_LIT>"):<EOL><INDENT>if node.is_leaf() and (not node.is_root()):<EOL><INDENT>node.y = _treeheight - _root.get_distance(node)<EOL>if not uselen:<EOL><INDENT>node.y = <NUM_LIT:0.0><EOL><DEDENT>if self.ttree._fixed_order:<EOL><INDENT>node.x = self.ttree._fixed_order.index(node.name)<EOL><DEDENT>else:<EOL><INDENT>node.x = tidx<EOL>tidx -= <NUM_LIT:1><EOL><DEDENT>self.verts[node.idx] = [node.x, node.y]<EOL><DEDENT>else:<EOL><INDENT>node.y = _treeheight - _root.get_distance(node)<EOL>if not uselen:<EOL><INDENT>node.y = max([i.y for i in node.children]) + <NUM_LIT:1><EOL><DEDENT>if node.children:<EOL><INDENT>nch = node.children<EOL>node.x = sum(i.x for i in nch) / float(len(nch))<EOL><DEDENT>else:<EOL><INDENT>node.x = tidx<EOL><DEDENT>self.verts[node.idx] = [node.x, node.y]<EOL><DEDENT><DEDENT>
Sets .edges, .verts for node positions. 
X and Y positions here refer to base assumption that tree is right
facing, reorient_coordinates() will handle re-translating this.