.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/introductory/05.span.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_introductory_05.span.py: ==== Span ==== A line or a band horizontal to an ternary axis can be plotted by the commands ``axtline``, ``axlline``, ``axrline``, ``axtspan``, ``axlspan``, ``axrspan``. .. GENERATED FROM PYTHON SOURCE LINES 9-28 .. image-sg:: /gallery/introductory/images/sphx_glr_05.span_001.svg :alt: 05.span :srcset: /gallery/introductory/images/sphx_glr_05.span_001.svg :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import mpltern # noqa: F401 ax = plt.subplot(projection='ternary') ax.set_tlabel('Top') ax.set_llabel('Left') ax.set_rlabel('Right') ax.axtline(0.2, c='C0') ax.axlline(0.3, c='C1') ax.axrline(0.4, c='C2') ax.axtspan(0.3, 0.5, fc='C0', alpha=0.2) ax.axlspan(0.4, 0.6, fc='C1', alpha=0.2) ax.axrspan(0.5, 0.7, fc='C2', alpha=0.2) plt.show() .. _sphx_glr_download_gallery_introductory_05.span.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 05.span.ipynb <05.span.ipynb>` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 05.span.py <05.span.py>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_