![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 Versions](https://img.shields.io/pypi/pyversions/plot-phylo)<br>
![PyPI - Version](https://img.shields.io/pypi/v/plot-phylo)
# 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/f0/39/e8764b9b9d0e76fc89b9cfc137022ecdb19be3fddf3bd6fa10ccdd25a6a8/plot_phylo-0.1.11.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 Versions](https://img.shields.io/pypi/pyversions/plot-phylo)<br>\n![PyPI - Version](https://img.shields.io/pypi/v/plot-phylo)\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": "0.1.11",
"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": "",
"digests": {
"blake2b_256": "2107c2e7dbe4cd32c6e110f892ec04288e30dd8582d146f2e3219f45048841df",
"md5": "8d4f8cfe9eb91386d8f1f7e827420eb2",
"sha256": "c48411b2eadf1705321296b36762a3319da13f1a23bd9c670bd3c3cfbe375638"
},
"downloads": -1,
"filename": "plot_phylo-0.1.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8d4f8cfe9eb91386d8f1f7e827420eb2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 14684,
"upload_time": "2024-10-01T16:55:19",
"upload_time_iso_8601": "2024-10-01T16:55:19.186884Z",
"url": "https://files.pythonhosted.org/packages/21/07/c2e7dbe4cd32c6e110f892ec04288e30dd8582d146f2e3219f45048841df/plot_phylo-0.1.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f039e8764b9b9d0e76fc89b9cfc137022ecdb19be3fddf3bd6fa10ccdd25a6a8",
"md5": "fee23e9da9722e2254dfcb13cce9e2e1",
"sha256": "4fccb9849f516af72a41e3dd91813c0c29985a29882dfe2fbe5129073ae9dbf5"
},
"downloads": -1,
"filename": "plot_phylo-0.1.11.tar.gz",
"has_sig": false,
"md5_digest": "fee23e9da9722e2254dfcb13cce9e2e1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 14218,
"upload_time": "2024-10-01T16:55:20",
"upload_time_iso_8601": "2024-10-01T16:55:20.512120Z",
"url": "https://files.pythonhosted.org/packages/f0/39/e8764b9b9d0e76fc89b9cfc137022ecdb19be3fddf3bd6fa10ccdd25a6a8/plot_phylo-0.1.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-01 16:55:20",
"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"
}