def mylayout(node): # If node is a leaf if node.is_leaf(): # And a line profile add_face_to_node(profileFace, node, 0, aligned=True) node.img_style["size"]=0 add_face_to_node(nameFace, node, 1, aligned=True)
def mylayout(node): # If node is a leaf if node.is_leaf(): # And a line profile add_face_to_node(profileFace, node, 0, aligned=True) node.img_style["size"] = 0 add_face_to_node(nameFace, node, 1, aligned=True)
def mylayout(node): # If node is a leaf if node.is_leaf(): # And a line profile add_face_to_node(profileFace, node, 0, aligned=True) node.img_style["size"] = 0 add_face_to_node(nameFace, node, 1, aligned=True) # If node is internal else: print node print node.silhouette # If silhouette is good, creates a green bubble if node.silhouette > 0: validationFace = TextFace("Silh=%0.2f" % node.silhouette, "Verdana", 10, "#056600") node.img_style["fgcolor"] = "#056600" # Otherwise, use red bubbles else: validationFace = TextFace("Silh=%0.2f" % node.silhouette, "Verdana", 10, "#940000") node.img_style["fgcolor"] = "#940000" # Sets node size proportional to the silhouette value. node.img_style["shape"] = "sphere" if node.silhouette <= 1 and node.silhouette >= -1: node.img_style["size"] = 15 + int((abs(node.silhouette) * 10)**2) # If node is very internal, draw also a bar diagram # with the average expression of the partition add_face_to_node(validationFace, node, 0) if len(node) > 100: add_face_to_node(cbarsFace, node, 1)
def mylayout(node): # If node is a leaf if node.is_leaf(): # And a line profile add_face_to_node(profileFace, node, 0, aligned=True) node.img_style["size"]=0 add_face_to_node(nameFace, node, 1, aligned=True) # If node is internal else: print node print node.silhouette # If silhouette is good, creates a green bubble if node.silhouette>0: validationFace = TextFace("Silh=%0.2f" %node.silhouette, "Verdana", 10, "#056600") node.img_style["fgcolor"]="#056600" # Otherwise, use red bubbles else: validationFace = TextFace("Silh=%0.2f" %node.silhouette, "Verdana", 10, "#940000") node.img_style["fgcolor"]="#940000" # Sets node size proportional to the silhouette value. node.img_style["shape"]="sphere" if node.silhouette<=1 and node.silhouette>=-1: node.img_style["size"]= 15+int((abs(node.silhouette)*10)**2) # If node is very internal, draw also a bar diagram # with the average expression of the partition add_face_to_node(validationFace, node, 0) if len(node)>100: add_face_to_node(cbarsFace, node, 1)
def mylayout(node): if node.is_leaf(): add_face_to_node(profileFace, node, 0, aligned=True)