-
-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding y_axis scale function #318
base: ete3
Are you sure you want to change the base?
Conversation
that's great. Thanks! I would review as soon as possible. |
The scale rotates but only at 90/180/270 degrees (It looks graphically bad otherwise) |
import os %matplotlib notebookos.environ["DISPLAY"] = ':4' t_f= '(((Leaf 32:1,Leaf 31:1):0.5,(Leaf 22:1,Leaf 21:1):11,(Leaf 2:1,Leaf 1:1):11,(Leaf 3:1,Leaf 4:1):12):11,(Leaf 5:1,Leaf 6:1):24);' tss = ete3.TreeStyle() t1 = ete3.TextFace("Header Face", fsize=12, fgcolor='black') tss.aligned_foot.add_face(t2, column=-1)for leaf in t_r: tss.show_scale=Truetss.rotation = 90tss.y_axis['scale_length'] = math.ceil(t_r.get_farthest_leaf()[1] - t_r.dist) tss.y_axis['scale_type'] = 'log' |
awesome, this is actually addressing #112 |
yes, various node sizes will alter the results |
5565957
to
27c2a99
Compare
7813a26
to
6edd122
Compare
Hi, I added a function that resize the internal nodes to node.img_style["size"]=0 and adds a face the floats behind the nodes and doesn't alter the scale. |
…n't alter the y axis scale.
Scale y axis
Hi, |
thanks! I will need some time for testing. Could you add some test code in |
The function gives the option to add full y axis scale to the tree in linear or log setting.
Also deleted the the twice written add_legend function in qt4_render.py (left one copy)
and set the script to fit better the pep8 structure