.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/axis_and_tick/00.axis_label_position.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_axis_and_tick_00.axis_label_position.py: =================== Axis-label position =================== Axis-label position can be controlled via e.g. ``ax.taxis.set_label_position``. - ``'corner'``: corner - ``'tick1'``: side for tick1 - ``'tick2'``: side for tick2 (should be used with turning on tick2) .. GENERATED FROM PYTHON SOURCE LINES 13-39 .. image-sg:: /gallery/axis_and_tick/images/sphx_glr_00.axis_label_position_001.svg :alt: position='corner', position='tick1' :srcset: /gallery/axis_and_tick/images/sphx_glr_00.axis_label_position_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() fig = plt.figure(figsize=(10.8, 4.8)) fig.subplots_adjust(wspace=0.3) positions = ['corner', 'tick1'] for i, position in enumerate(positions): ax = fig.add_subplot(1, 2, i + 1, projection='ternary') ax.plot(t, l, r) ax.set_tlabel('Top') ax.set_llabel('Left') ax.set_rlabel('Right') ax.taxis.set_label_position(position) ax.laxis.set_label_position(position) ax.raxis.set_label_position(position) ax.set_title(f"position='{position}'", pad=42) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 1.517 seconds) .. _sphx_glr_download_gallery_axis_and_tick_00.axis_label_position.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 00.axis_label_position.ipynb <00.axis_label_position.ipynb>` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 00.axis_label_position.py <00.axis_label_position.py>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_