minimalist tree plotting using toyplot
Project description
Tree plotting with Toytree
Welcome to toytree, a minimalist tree manipulation and plotting library for use inside jupyter notebooks. Toytree combines a popular tree data structure based on the ete3 library with modern plotting tools based on the toyplot plotting library. The goal of toytree is to provide a light-weight Python equivalent to commonly used tree manipulation and plotting libraries in R, and in doing so, to promote further development of phylogenetic methods in Python. Toytree generates rich interactive figures (SVG+HTML+JS) that can be embedded in jupyter-notebooks or webpages, or rendered in SVG, PDF, or PNG for publications.
Examples Gallery
Installation
You can install toytree and its dependencies (toyplot and numpy) with a single command using conda (preferred), or from pip.
conda install toytree -c eaton-lab
Documentation
See the full documentation to see all of the options that toytree provides. Try it out instantly in the cloud using the toytree binder.
Examples
# import toyplot and load a newick file from a public URL
import toytree
tre = 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 together
tre.root(wildcard='prz').drop_tips(wildcard="tham").ladderize().draw();
# extensive styling options are available
rtre.draw(
tip_labels_color='pink',
node_labels='support',
node_sizes=15,
node_colors="cyan",
edge_style={
"stroke": "darkgrey",
"stroke-width": 3,
},
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toytree-1.1.2.tar.gz.
File metadata
- Download URL: toytree-1.1.2.tar.gz
- Upload date:
- Size: 81.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200209 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3ca73a998d5235582b5f56a63c8e9ee4254087816388f8cec5b7670982c1a80
|
|
| MD5 |
8a5fa7a44eb56d7621bdf5465dfd69e1
|
|
| BLAKE2b-256 |
7bb9da9036ceeabccd1df33cea92d31695a3700869ec5633150d7f20ea298911
|
File details
Details for the file toytree-1.1.2-py3-none-any.whl.
File metadata
- Download URL: toytree-1.1.2-py3-none-any.whl
- Upload date:
- Size: 101.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200209 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05409e050c22b2a98ca16fc864be5617525f0bf16f10c233a4752bc770cb1185
|
|
| MD5 |
9e624100629132925a071fb9ee449d5f
|
|
| BLAKE2b-256 |
6bf92ec9d7ab9484d2b58d4fee7932eadc297bbbfc55b4503a508af275dd0867
|