Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

minimalist tree plotting using toyplot

Project description

Join the chat at Install with conda

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.


You can install toytree and its dependencies (toyplot and numpy) with a single command using conda (preferred), or from pip.

conda install toytree -c conda-forge


See the full documentation to see all of the options that toytree provides. Try it out instantly in the cloud using the toytree binder.


# import toyplot and load a newick file from a public URL
import toytree
tre = toytree.tree("")

# 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

# extensive styling options are available
        "stroke": "darkgrey",
        "stroke-width": 3,

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for toytree, version 2.0.1
Filename, size File type Python version Upload date Hashes
Filename, size toytree-2.0.1-py3-none-any.whl (108.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size toytree-2.0.1.tar.gz (99.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page