def __init__(self, tree, size=None, node_labels=None, mutation_labels=None, tree_height_scale=None, max_tree_height=None, node_attrs=None, edge_attrs=None, node_label_attrs=None, mutation_attrs=None, mutation_label_attrs=None):
    self.tree = tree
    if (size is None):
        size = (200, 200)
    self.image_size = size
    self.setup_drawing()
    self.treebox_x_offset = 10
    self.treebox_y_offset = 10
    self.treebox_width = (size[0] - (2 * self.treebox_x_offset))
    self.assign_y_coordinates(tree_height_scale, max_tree_height)
    self.node_x_coord_map = self.assign_x_coordinates(tree, self.treebox_x_offset, self.treebox_width)
    self.edge_attrs = {}
    self.node_attrs = {}
    self.node_label_attrs = {}
    for u in tree.nodes():
        self.edge_attrs[u] = {}
        if ((edge_attrs is not None) and (u in edge_attrs)):
            self.edge_attrs[u].update(edge_attrs[u])
        self.node_attrs[u] = {'r': 3}
        if ((node_attrs is not None) and (u in node_attrs)):
            self.node_attrs[u].update(node_attrs[u])
        label = ''
        if (node_labels is None):
            label = str(u)
        elif (u in node_labels):
            label = str(node_labels[u])
        self.node_label_attrs[u] = {'text': label}
        if ((node_label_attrs is not None) and (u in node_label_attrs)):
            self.node_label_attrs[u].update(node_label_attrs[u])
    self.mutation_attrs = {}
    self.mutation_label_attrs = {}
    for site in tree.sites():
        for mutation in site.mutations:
            m = mutation.id
            self.mutation_attrs[m] = {'size': (6, 6), 'transform': 'translate(-3, -3)'}
            if ((mutation_attrs is not None) and (m in mutation_attrs)):
                self.mutation_attrs[m].update(mutation_attrs[m])
            label = ''
            if (mutation_labels is None):
                label = str(m)
            elif (mutation.id in mutation_labels):
                label = str(mutation_labels[m])
            self.mutation_label_attrs[m] = {'text': label}
            if ((mutation_label_attrs is not None) and (m in mutation_label_attrs)):
                self.mutation_label_attrs[m].update(mutation_label_attrs[m])
    self.draw()
def __init__(self, tree, size=None, node_labels=None, mutation_labels=None, tree_height_scale=None, max_tree_height=None, node_attrs=None, edge_attrs=None, node_label_attrs=None, mutation_attrs=None, mutation_label_attrs=None):
    self.tree = tree
    if (size is None):
        size = (200, 200)
    self.image_size = size
    self.setup_drawing()
    self.treebox_x_offset = 10
    self.treebox_y_offset = 10
    self.treebox_width = (size[0] - (2 * self.treebox_x_offset))
    self.assign_y_coordinates(tree_height_scale, max_tree_height)
    self.node_x_coord_map = self.assign_x_coordinates(tree, self.treebox_x_offset, self.treebox_width)
    self.edge_attrs = {}
    self.node_attrs = {}
    self.node_label_attrs = {}
    for u in tree.nodes():
        self.edge_attrs[u] = {}
        if ((edge_attrs is not None) and (u in edge_attrs)):
            self.edge_attrs[u].update(edge_attrs[u])
        self.node_attrs[u] = {'r': 3}
        if ((node_attrs is not None) and (u in node_attrs)):
            self.node_attrs[u].update(node_attrs[u])
        label = 
        if (node_labels is None):
            label = str(u)
        elif (u in node_labels):
            label = str(node_labels[u])
        self.node_label_attrs[u] = {'text': label}
        if ((node_label_attrs is not None) and (u in node_label_attrs)):
            self.node_label_attrs[u].update(node_label_attrs[u])
    self.mutation_attrs = {}
    self.mutation_label_attrs = {}
    for site in tree.sites():
        for mutation in site.mutations:
            m = mutation.id
            self.mutation_attrs[m] = {'size': (6, 6), 'transform': 'translate(-3, -3)'}
            if ((mutation_attrs is not None) and (m in mutation_attrs)):
                self.mutation_attrs[m].update(mutation_attrs[m])
            label = 
            if (mutation_labels is None):
                label = str(m)
            elif (mutation.id in mutation_labels):
                label = str(mutation_labels[m])
            self.mutation_label_attrs[m] = {'text': label}
            if ((mutation_label_attrs is not None) and (m in mutation_label_attrs)):
                self.mutation_label_attrs[m].update(mutation_label_attrs[m])
    self.draw()