Skip to main content

drawing tools for Demes demographic models

Project description

DemesDraw

demesdraw is a Python package that contains drawing functions for Demes demographic models, using matplotlib to create the figures. DemesDraw offers both a command line interface, and a Python API. Feedback is very welcome.

Installation

$ python3 -m pip install demesdraw

Usage

Command line

$ demesdraw tubes --log-time \
	examples/stdpopsim/HomSap__AmericanAdmixture_4B11.yaml \
	AmericanAdmixture_4B11_tubes.svg

stdpopsim/AmericanAdmixture_4B11 as tubes

Python API

import demes
import demesdraw

graph = demes.load("examples/stdpopsim/HomSap__AmericanAdmixture_4B11.yaml")
ax = demesdraw.size_history(graph, log_time=True)
ax.figure.savefig("AmericanAdmixture_4B11_size_history.svg")

stdpopsim/AmericanAdmixture_4B11 size history

Documentation

Complete API and CLI details are available in the DemesDraw documentation.

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 demesdraw, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size demesdraw-0.1.4-py3-none-any.whl (17.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size demesdraw-0.1.4.tar.gz (136.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring 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