.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/transforms/06.plot_fixed_onto_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_transforms_06.plot_fixed_onto_triangle.py: ======================== Plot fixed onto triangle ======================== You can plot onto the fixed positions of the triangle by specifying `tranform=ax.transTernaryAxes`. This may be particularly useful for some cases in interactive modes. .. GENERATED FROM PYTHON SOURCE LINES 10-27 .. image-sg:: /gallery/transforms/images/sphx_glr_06.plot_fixed_onto_triangle_001.svg :alt: 06.plot fixed onto triangle :srcset: /gallery/transforms/images/sphx_glr_06.plot_fixed_onto_triangle_001.svg :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt from mpltern.datasets import get_spiral t, l, r = get_spiral() c = 1.0 / 3.0 ax = plt.subplot(projection='ternary') ax.set_ternary_min(0.1, 0.2, 0.3) ax.plot(t, l, r) ax.text(c, c, c, 'Data', ha='center') ax.plot(t, l, r, transform=ax.transTernaryAxes) ax.text(c, c, c, 'Axes', ha='center', transform=ax.transTernaryAxes) plt.show() .. _sphx_glr_download_gallery_transforms_06.plot_fixed_onto_triangle.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 06.plot_fixed_onto_triangle.ipynb <06.plot_fixed_onto_triangle.ipynb>` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 06.plot_fixed_onto_triangle.py <06.plot_fixed_onto_triangle.py>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_