當前位置: 首頁>>代碼示例>>Python>>正文


Python TreeStyle.min_leaf_separation方法代碼示例

本文整理匯總了Python中ete3.TreeStyle.min_leaf_separation方法的典型用法代碼示例。如果您正苦於以下問題:Python TreeStyle.min_leaf_separation方法的具體用法?Python TreeStyle.min_leaf_separation怎麽用?Python TreeStyle.min_leaf_separation使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ete3.TreeStyle的用法示例。


在下文中一共展示了TreeStyle.min_leaf_separation方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: get_example_tree

# 需要導入模塊: from ete3 import TreeStyle [as 別名]
# 或者: from ete3.TreeStyle import min_leaf_separation [as 別名]
def get_example_tree():
    t = Tree()
    ts = TreeStyle()
    ts.layout_fn = layout
    ts.mode = "c"
    ts.show_leaf_name = True
    ts.min_leaf_separation = 15
    t.populate(100)
    return t, ts
開發者ID:AlishaMechtley,項目名稱:ete,代碼行數:11,代碼來源:floating_piecharts.py

示例2: print

# 需要導入模塊: from ete3 import TreeStyle [as 別名]
# 或者: from ete3.TreeStyle import min_leaf_separation [as 別名]
except IOError:
    print ("Unknown file: ", treefile)
    sys.exit()

lines = ""
for l in f:
    lines = lines+l
f.close()

t = Tree(lines, format=1 )

 #"((HalmarSJ:59,(BdeexoJS:7,(BdebacW:6,(Bdebacst:4,Bdebac:4)64:2)65:1)66:52)853:1,((((SorcelSoe7:5,SorcelSo:5)87:11,HalochDS:16)97:1,(((((MyxxanDK:8,MyxfulHW:8)86:2,(MyxstiDS:9,Myxful12:9)85:1)96:1,CorcorDS:11)103:1,Arcgep:12)106:3,(AnaspFw:13,(Anadeh2Ca8:2,(Anadeh2C:1,AnaspK:1)61:1)62:11)63:2)109:2)112:41,(((PelcarDS:31,Geosub:31)81:1,((PelproDS:22,GeolovSZ:22)79:8,((Geopic:24,((GeosulPC:3,GeosulKN:3)82:20,GeometGS:23)94:1)101:5,((GeouraRf:27,GeodalFR:27)78:1,(GeospM1:18,(GeospM2:14,GeobemBe:14)77:4)80:10)93:1)104:1)107:2)110:25,(((SynaciSB:54,DestieDS:54)75:1,((((DesoleHx:35,(DestolTo:34,DesautHR:34)70:1)72:1,DesalkAK:36)89:14,((((DessulDS:37,DespsyLS:37)73:5,DesproDS:42)90:1,DesalkAH:43)98:6,((DesretDS:44,DesbacDS:44)71:4,((((Desvulstn6:26,((Desvulst:21,DesvulRC:21)76:4,DesvulDP:25)92:1)100:12,((LawintPH:19,LawintN3:19)84:14,Desdessu:33)95:5)102:1,DesalaG2:39)105:8,(DesmagRS:46,(Desafrst:45,(DessalDS:41,(DesdesND:40,DesaesAs:40)69:1)74:4)91:1)99:1)108:1)111:1)113:1)114:3,(SynfumMP:52,(DesbaaDS:51,DesaceDS:51)68:1)88:1)115:2)116:1,(HipmarDS:20,DesaceA6:20)67:36)117:1)118:1)119:2);", format=1 )


ts = TreeStyle()
ts.min_leaf_separation= 0
#ts.scale = 88
nstyle = NodeStyle()
nstyle["size"] = 0.0001
for n in t.traverse():
    n.set_style(nstyle)

#t.render("tree.png", tree_style=ts)

coord = t.render(outputfile+".png", tree_style=ts, w=183, units="mm")


#coord = t.render("tree.png")
#print(coord)

# Map between node name and node id
開發者ID:Boussau,項目名稱:Notebooks,代碼行數:33,代碼來源:plotTransfersOnTree.py


注:本文中的ete3.TreeStyle.min_leaf_separation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。