本文整理汇总了Python中ete3.TreeStyle.margin_bottom方法的典型用法代码示例。如果您正苦于以下问题:Python TreeStyle.margin_bottom方法的具体用法?Python TreeStyle.margin_bottom怎么用?Python TreeStyle.margin_bottom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ete3.TreeStyle
的用法示例。
在下文中一共展示了TreeStyle.margin_bottom方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_tree_style
# 需要导入模块: from ete3 import TreeStyle [as 别名]
# 或者: from ete3.TreeStyle import margin_bottom [as 别名]
def get_tree_style():
ts = TreeStyle()
# ts.mode = 'c'
ts.margin_top = 10
ts.margin_bottom = 10
ts.margin_left = 10
ts.margin_right = 10
ts.show_leaf_name = False
ts.show_branch_length = False
ts.show_branch_support = False
ts.show_scale = False
title = TextFace(" Tax Assignment Tree", fsize=10)
title.hz_align = 2
title.vt_align = 2
ts.title.add_face(TextFace(" "), column=0)
ts.title.add_face(TextFace(" "), column=0)
ts.title.add_face(title, column=0)
return ts
示例2: get_default_tree_style
# 需要导入模块: from ete3 import TreeStyle [as 别名]
# 或者: from ete3.TreeStyle import margin_bottom [as 别名]
def get_default_tree_style(color_dict):
ts = TreeStyle()
ts.mode = "c"
# ts.layout_fn = layout
ts.margin_top = 50
ts.margin_bottom = 0
ts.margin_left = 50
ts.margin_right = 50
ts.show_scale = False
ts.show_leaf_name = False
ts.show_branch_length = False
ts.show_branch_support = False
for p, c in color_dict.iteritems():
ts.legend.add_face(TextFace(" ", fsize=30), column=0)
ts.legend.add_face(CircleFace(10, c), column=1)
ts.legend.add_face(TextFace(" %s" % p, fsize=30), column=2)
legend_margin_line = 5
while legend_margin_line:
ts.legend.add_face(TextFace(" "), column=0)
ts.legend.add_face(TextFace(" "), column=1)
ts.legend.add_face(TextFace(" "), column=2)
legend_margin_line -= 1
ts.legend_position = 3
return ts