def heatmap(node): square_size = 10 # Extras node info node.collapsed = False # Color and style node.img_style["fgcolor"] = "#3333FF" node.img_style["size"] = 0 ncols = node.arraytable.matrix.shape[1] matrix_max = numpy.max(node.arraytable._matrix_max) matrix_min = numpy.min(node.arraytable._matrix_min) print matrix_max matrix_avg = matrix_min + ((matrix_max - matrix_min) / 2) ProfileFace = faces.ProfileFace(\ matrix_max,\ matrix_min,\ matrix_avg,\ square_size*ncols,\ square_size,\ "heatmap") ProfileFace.ymargin = 0 if node.is_leaf(): # Set colors faces.add_face_to_node(ProfileFace, node, 0, aligned=True)
def cluster_bars(node): # Extras node info node.collapsed = False # Color and style node.img_style["fgcolor"] = "#3333FF" node.img_style["size"] = 4 if node.is_leaf(): matrix_max = numpy.max(node.arraytable._matrix_max) matrix_min = numpy.min(node.arraytable._matrix_min) matrix_avg = matrix_min + ((matrix_max - matrix_min) / 2) ProfileFace = faces.ProfileFace(\ matrix_max,\ matrix_min,\ matrix_avg,\ 200,\ 40,\ "bars") nameFace = faces.AttrFace("name", fsize=6) faces.add_face_to_node(nameFace, node, 1, aligned=True) faces.add_face_to_node(ProfileFace, node, 0, aligned=True)