.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/tree/plot_scalebar.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_tree_plot_scalebar.py: Scale bar ========= This example shows how to add a scale bar to an ``iplotx`` tree. .. GENERATED FROM PYTHON SOURCE LINES 7-20 .. image-sg:: /gallery/tree/images/sphx_glr_plot_scalebar_001.png :alt: plot scalebar :srcset: /gallery/tree/images/sphx_glr_plot_scalebar_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none | .. code-block:: Python 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", ) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.035 seconds) .. _sphx_glr_download_gallery_tree_plot_scalebar.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_scalebar.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_scalebar.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_scalebar.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_