Skip to main content

Python package for tree plotting.

Project description

treeplotter

Actions Status img

Tree plotting is really hard in Python. This package aims to make the process easier. It wraps the TreantJS library to plot trees and saves them to a rendered HTML file. This HTML file is then also exported to a high-res PNG by wrapping R's webshot package. The package requires some complicated installs, but this is the price to pay to not use any R, Javascript, or CSS ;)

Usage

This library has Node and Tree classes in the treeplotter.tree module. Node objects store a value and a name (string or None). We can then specify the nodes children and parent. A Tree is then defined by a root node. We can then create a tree visualization. See Tutorial.md for a complete demo.

This package is used in the decitala package (see here) to make FragmentTree diagrams, like the following one of the Greek Prosodic Feet:

Images can be added to Node objects, and we can customize tree properties with connector types and orientation.

Project details


Download files

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

Source Distribution

treeplotter-0.3.1.tar.gz (7.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page