plot-phylo


Nameplot-phylo JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/KatyBrown/plot_phylo
SummaryThis module allows the user to plot a phylogenetic tree on an existing matplotlib axis.
upload_time2025-07-21 13:27:15
maintainerNone
docs_urlNone
authorKaty Brown, Duncan Cross
requires_python>=3.6
licenseMIT License
keywords phylogenetics matplotlib
VCS
bugtrack_url
requirements matplotlib ete3
Travis-CI No Travis.
coveralls test coverage
            ![Tests Passing](https://github.com/KatyBrown/plot_phylo/actions/workflows/main.yml/badge.svg)<br>
[![Documentation Status](https://readthedocs.org/projects/plot-phylo/badge/?version=latest)](https://plot-phylo.readthedocs.io/en/latest/?badge=latest)<br>
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)<br>
![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2FKatyBrown%2Fplot_phylo%2Frefs%2Fheads%2Fmain%2Fpyproject.toml)<br>
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13871592.svg)](https://doi.org/10.5281/zenodo.13871592)<br>
[![pyOpenSci Peer-Reviewed](https://pyopensci.org/badges/peer-reviewed.svg)](https://github.com/pyOpenSci/software-review/issues/issue-number)

# plot_phylo

![Illustration](./examples/layered.png "Illustration")

This module allows the user to plot a phylogenetic tree on an existing matplotlib axis.

This means that:
* Phylogenies can be incorporated into existing plots.
* Annotations can be added using standard matplotlib functionality.
* Plots can be output in png, pdf, svg or tiff formats.
* Automatically generated and updated figures can include phylogenies

Full documentation is available via [ReadTheDocs](https://plot-phylo.readthedocs.io/en/latest/index.html).

The module depends on the [ETE Toolkit](http://etetoolkit.org/), an excellent existing Python framework for analysing and visualising phylogenetic trees, plus the [matplotlib](https://matplotlib.org/) visualisation library. It is designed to make generating complex figures incorporating phylogenies easier, as matplotlib plotting functions can be used on top of the basic tree.


## Installation

**Requirements**

* python >= 3.6
* matplotlib >= 2.1.1
* ete3 >= 3.1.0

The module can be installed using pip

`pip install plot_phylo`

You can also download the latest release [here](https://github.com/KatyBrown/plot_phylo/releases/latest)

Or clone the GitHub repository directly.

`git clone git@github.com:KatyBrown/plot_phylo.git`

## Quick Start
For detailed usage instructions, visit our [ReadTheDocs page](https://plot-phylo.readthedocs.io/en/latest/index.html).

To draw a phylogeny under the default settings onto a blank figure.

```
import matplotlib.pyplot as plt
import plot_phylo

# Create an empty plot, 8in (width) by 10in (height) - matplotlib
f = plt.figure(figsize=(8, 10))

# Add an axis - matplotlib
ax = plt.subplot()

# Plot the tree on this axis, using the default settings - plot_phylo
results = plot_phylo.plot_phylo("examples/primates.nw", ax)

# Save the tree - matplotlib
plt.savefig("examples/basic_plot.png", bbox_inches='tight')
```


## Cite

If you use this repository in your work, please cite:

Brown, K (2024) plot_phylo. https://github.com/KatyBrown/plot_phylo

## Continuous Integration
I use GitHub Actions for continuous integration to ensure code quality. You can view the configuration [here](https://github.com/KatyBrown/plot_phylo/blob/main/.github/workflows/main.yml).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/KatyBrown/plot_phylo",
    "name": "plot-phylo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "Katy Brown <kab84@cam.ac.uk>",
    "keywords": "phylogenetics, matplotlib",
    "author": "Katy Brown, Duncan Cross",
    "author_email": "Katy Brown <kab84@cam.ac.uk>",
    "download_url": "https://files.pythonhosted.org/packages/dc/11/1241f73ffb0adca6799cdb4c998468dd8282662cbcbb8ed597f35a17bff3/plot_phylo-1.0.1.tar.gz",
    "platform": null,
    "description": "![Tests Passing](https://github.com/KatyBrown/plot_phylo/actions/workflows/main.yml/badge.svg)<br>\n[![Documentation Status](https://readthedocs.org/projects/plot-phylo/badge/?version=latest)](https://plot-phylo.readthedocs.io/en/latest/?badge=latest)<br>\n[![Project Status: Active \u2013 The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)<br>\n![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2FKatyBrown%2Fplot_phylo%2Frefs%2Fheads%2Fmain%2Fpyproject.toml)<br>\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13871592.svg)](https://doi.org/10.5281/zenodo.13871592)<br>\n[![pyOpenSci Peer-Reviewed](https://pyopensci.org/badges/peer-reviewed.svg)](https://github.com/pyOpenSci/software-review/issues/issue-number)\n\n# plot_phylo\n\n![Illustration](./examples/layered.png \"Illustration\")\n\nThis module allows the user to plot a phylogenetic tree on an existing matplotlib axis.\n\nThis means that:\n* Phylogenies can be incorporated into existing plots.\n* Annotations can be added using standard matplotlib functionality.\n* Plots can be output in png, pdf, svg or tiff formats.\n* Automatically generated and updated figures can include phylogenies\n\nFull documentation is available via [ReadTheDocs](https://plot-phylo.readthedocs.io/en/latest/index.html).\n\nThe module depends on the [ETE Toolkit](http://etetoolkit.org/), an excellent existing Python framework for analysing and visualising phylogenetic trees, plus the [matplotlib](https://matplotlib.org/) visualisation library. It is designed to make generating complex figures incorporating phylogenies easier, as matplotlib plotting functions can be used on top of the basic tree.\n\n\n## Installation\n\n**Requirements**\n\n* python >= 3.6\n* matplotlib >= 2.1.1\n* ete3 >= 3.1.0\n\nThe module can be installed using pip\n\n`pip install plot_phylo`\n\nYou can also download the latest release [here](https://github.com/KatyBrown/plot_phylo/releases/latest)\n\nOr clone the GitHub repository directly.\n\n`git clone git@github.com:KatyBrown/plot_phylo.git`\n\n## Quick Start\nFor detailed usage instructions, visit our [ReadTheDocs page](https://plot-phylo.readthedocs.io/en/latest/index.html).\n\nTo draw a phylogeny under the default settings onto a blank figure.\n\n```\nimport matplotlib.pyplot as plt\nimport plot_phylo\n\n# Create an empty plot, 8in (width) by 10in (height) - matplotlib\nf = plt.figure(figsize=(8, 10))\n\n# Add an axis - matplotlib\nax = plt.subplot()\n\n# Plot the tree on this axis, using the default settings - plot_phylo\nresults = plot_phylo.plot_phylo(\"examples/primates.nw\", ax)\n\n# Save the tree - matplotlib\nplt.savefig(\"examples/basic_plot.png\", bbox_inches='tight')\n```\n\n\n## Cite\n\nIf you use this repository in your work, please cite:\n\nBrown, K (2024) plot_phylo. https://github.com/KatyBrown/plot_phylo\n\n## Continuous Integration\nI use GitHub Actions for continuous integration to ensure code quality. You can view the configuration [here](https://github.com/KatyBrown/plot_phylo/blob/main/.github/workflows/main.yml).\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "This module allows the user to plot a phylogenetic tree on an existing matplotlib axis.",
    "version": "1.0.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/KatyBrown/plot_phylo/issues",
        "Documentation": "https://plot-phylo.readthedocs.io",
        "Homepage": "https://github.com/KatyBrown/plot_phylo",
        "Repository": "https://github.com/KatyBrown/plot_phylo"
    },
    "split_keywords": [
        "phylogenetics",
        " matplotlib"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ed5714d2ca7f1412840c975582f2f7075bd86c113251f3251591651a1150cdcf",
                "md5": "c0ab72c8e6b980e87f4f9c1ee8fdbaa6",
                "sha256": "0994da5c458bf24e8ea74547f8fad9fac409b8e5e7887a8d748f703fe51f828e"
            },
            "downloads": -1,
            "filename": "plot_phylo-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c0ab72c8e6b980e87f4f9c1ee8fdbaa6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 14532,
            "upload_time": "2025-07-21T13:27:14",
            "upload_time_iso_8601": "2025-07-21T13:27:14.789941Z",
            "url": "https://files.pythonhosted.org/packages/ed/57/14d2ca7f1412840c975582f2f7075bd86c113251f3251591651a1150cdcf/plot_phylo-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dc111241f73ffb0adca6799cdb4c998468dd8282662cbcbb8ed597f35a17bff3",
                "md5": "d3b9584ef2a9e7ac675ba144d32325f7",
                "sha256": "ab9151348703d1902c7b98911d118f393ced33ebb23e797da043eb82715bf42d"
            },
            "downloads": -1,
            "filename": "plot_phylo-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d3b9584ef2a9e7ac675ba144d32325f7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 17848,
            "upload_time": "2025-07-21T13:27:15",
            "upload_time_iso_8601": "2025-07-21T13:27:15.694822Z",
            "url": "https://files.pythonhosted.org/packages/dc/11/1241f73ffb0adca6799cdb4c998468dd8282662cbcbb8ed597f35a17bff3/plot_phylo-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-21 13:27:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "KatyBrown",
    "github_project": "plot_phylo",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "matplotlib",
            "specs": [
                [
                    ">=",
                    "2.1.1"
                ]
            ]
        },
        {
            "name": "ete3",
            "specs": [
                [
                    ">=",
                    "3.1.0"
                ]
            ]
        }
    ],
    "lcname": "plot-phylo"
}
        
Elapsed time: 1.97581s