用toyplot绘制最小树

toytree的Python项目详细描述


Join the chat at https://gitter.im/toytree-help/LobbyInstall with condahttps://travis-ci.org/eaton-lab/toytree.svg?branch=master

使用toytree绘制树

欢迎来到Toytree,这是一个用于Jupyter笔记本电脑内部的极简树操作和绘图库。toytree结合了一种流行的基于ete3库的树数据结构和基于toyplot库的现代绘图工具。toytree的目标是提供一个轻量级的python,相当于r中常用的树操作和绘图库,并以此促进python中系统发生方法的进一步发展。toytree生成丰富的交互式图形(svg+html+js),可以嵌入到jupyter笔记本或网页中,也可以用svg、pdf或png呈现出版物。

安装

您可以使用conda(首选)或从pip使用单个命令安装toytree及其依赖项(toyplotnumpy)。

conda install toytree -c eaton-lab

文档

请参见full documentation以查看toytree提供的所有选项。使用toytree binder在云中立即试用。

示例

# import toyplot and load a newick file from a public URLimporttoytreetre=toytree.tree("https://eaton-lab.org/data/Cyathophora.tre")# root the tree using a wildcard string matching and draw a tree figure.rtre=tre.root(wildcard='prz')rtre.draw(width=400,tip_labels_align=True);# or chain a few functions togethertre.root(wildcard='prz').drop_tips(wildcard="tham").ladderize().draw();# extensive styling options are availablertre.draw(tip_labels_color='pink',node_labels='support',node_sizes=15,node_colors="cyan",edge_style={"stroke":"darkgrey","stroke-width":3,},)

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java调用Python函数作为TEID中的UDF   java Android。支持v4导入不工作   java如何影响具有静态属性的类   java如何在从glTexImage2D()分配后编辑纹理的像素颜色   javaspringboot+rediscache+@Cacheable适用于某些方法,而不适用于其他方法   java无法将动态Web模块方面从3.0更改为2.5   java如何在新选项卡中显示打印的文档?   java Google Cloud Endpoints API方法仅在删除用户参数时成功调用   java为什么我可以使用Stack<Double>但不能使用Stack<Double>?   java JDBC PreparedStatement似乎忽略了占位符   java如何设置JInternalFrame的标准图标化位置?   Java文件。copy()不复制文件   基于另一个类的java显示arraylist?   java Android Studio:错误:非法字符:'\u2028'   对象(Java)无法实例化类型映像?   javascript错误:飞行前响应的HTTP状态代码401无效   java确保泛型vararg参数具有相同的类型