You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to change the font of each node's text. Currently, I'm doing this:
importete3defnodeStyler(node: ete3.TreeNode):
# Set node stylenstyle=ete3.NodeStyle()
nstyle["size"] =0node.set_style(nstyle)
# Set style of node's texts=node.nameifnode.nameelse"{}"F=ete3.TextFace(s, tight_text=True, ftype="CMU Serif")
F.rotation=-90node.add_face(F, column=0, position="branch-right") # Adds extra textnode.name=""# Removes the default text ... don't know how else to do it.# Build treet=ete3.Tree("((aabc,aabd,aabef)aab,ab,b);", format=8)
# Style treets=ete3.TreeStyle()
ts.show_leaf_name=Truets.show_scale=Falsets.rotation=90ts.min_leaf_separation=75ts.layout_fn=nodeStylert.render("test_tree.pdf", tree_style=ts)
However, this results in doubled-up text after rendering:
Zoomed in:
Presumably, this is because there already is text and I'm adding more, but I don't understand how the existing text would have its font changed by me adding new text.
The text was updated successfully, but these errors were encountered:
Try it with ts.show_leaf_name = False, this should remove the automatically-added node.name text; I might have misunderstood something but I never use ts.show_leaf_name when names or name properties are edited.
I want to change the font of each node's text. Currently, I'm doing this:
However, this results in doubled-up text after rendering:
Zoomed in:
Presumably, this is because there already is text and I'm adding more, but I don't understand how the existing text would have its font changed by me adding new text.
The text was updated successfully, but these errors were encountered: