Note
Go to the end to download the full example code.
Scale bar#
This example shows how to add a scale bar to an iplotx tree.

<iplotx.tree.scalebar.TreeScalebarArtist object at 0x7af3907a3770>
from dendropy import Tree
import iplotx as ipx
tree = Tree.get(data="((,(,((,),(,)))));", schema="newick")
tree_artist = ipx.plotting.tree(
tree,
edge_color="grey",
)
tree_artist.scalebar(
loc="upper left",
)
Total running time of the script: (0 minutes 0.035 seconds)