.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/triangle/02.arbitrary_triangle.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_triangle_02.arbitrary_triangle.py: ================== Arbitrary triangle ================== You can make a ternary plot on an triangle with arbitrary shape. .. GENERATED FROM PYTHON SOURCE LINES 8-24 .. image-sg:: /gallery/triangle/images/sphx_glr_02.arbitrary_triangle_001.svg :alt: 02.arbitrary triangle :srcset: /gallery/triangle/images/sphx_glr_02.arbitrary_triangle_001.svg :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt from mpltern.datasets import get_spiral corners = ((0.0, 0.0), (0.5, 0.5), (-0.5, 1.0)) ax = plt.subplot(projection='ternary', corners=corners) ax.plot(*get_spiral()) ax.set_tlabel('Top') ax.set_llabel('Left') ax.set_rlabel('Right') ax.grid() plt.show() .. _sphx_glr_download_gallery_triangle_02.arbitrary_triangle.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 02.arbitrary_triangle.ipynb <02.arbitrary_triangle.ipynb>` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 02.arbitrary_triangle.py <02.arbitrary_triangle.py>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_