mirror of
https://github.com/biopython/biopython.git
synced 2025-10-20 05:33:47 +08:00
Add paragraph about iplotx in Phylo tutorial (#5028)
Add mention in NEWS.rst
This commit is contained in:
@ -240,6 +240,35 @@ well as its descendents. The common ancestor of E and F turns out to be
|
||||
just under the root, and with this coloring we can see exactly where the
|
||||
root of the tree is.
|
||||
|
||||
Drawing trees with iplotx
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
For users seeking advanced styling options, Bio.Phylo trees are natively
|
||||
supported by the external library ``iplotx``:
|
||||
|
||||
https://iplotx.readthedocs.io/en/latest/
|
||||
|
||||
``iplotx`` enables customisation of many aspects of the visualisation,
|
||||
including layout, vertex and branch properties, cascading backgrounds,
|
||||
and labels. Here is a self-contained example.
|
||||
|
||||
.. code:: pycon
|
||||
|
||||
>>> from Bio import Phylo
|
||||
>>> import iplotx as ipx
|
||||
>>> tree = Phylo.read("simple.dnd", "newick")
|
||||
>>> ipx.tree(tree, leaf_deep=True, leaf_labels=True, style="tree")
|
||||
|
||||
.. figure:: ../images/phylo-color-iplotx.png
|
||||
:alt: A colorized tree drawn with ``iplotx.tree``.
|
||||
:name: fig:phylo-color-iplotx
|
||||
:width: 70.0%
|
||||
|
||||
``iplotx`` has an extensive `gallery of examples <https://iplotx.readthedocs.io/en/latest/gallery/index.html>`__.
|
||||
|
||||
Writing tree to file
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
My, we’ve accomplished a lot! Let’s take a break here and save our work.
|
||||
Call the ``write`` function with a file name or handle — here we use
|
||||
standard output, to see what would be written — and the format
|
||||
|
BIN
Doc/images/phylo-color-iplotx.png
Normal file
BIN
Doc/images/phylo-color-iplotx.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.2 KiB |
5
NEWS.rst
5
NEWS.rst
@ -45,12 +45,17 @@ being used for additional metadata, typically from computational tools.
|
||||
|
||||
``Bio.PDB.PDBIO`` will now raise module specific warnings: ``Bio.PDB.PDBExceptions.PDBIOWarning``.
|
||||
|
||||
|
||||
The ``iplotx`` library is mentioned in the Tutorial as an option to visualise
|
||||
trees using complex style options.
|
||||
|
||||
Many thanks to the Biopython developers and community for making this release
|
||||
possible, especially the following contributors:
|
||||
|
||||
- Rachel Stern (first contribution)
|
||||
- Oliver Wissett (first contribution)
|
||||
- Samuel Prince (first contribution)
|
||||
- Fabio Zanini
|
||||
|
||||
15 January 2025: Biopython 1.85
|
||||
===============================
|
||||
|
Reference in New Issue
Block a user