

.. _sphx_glr_gallery_userdemo_simple_axis_direction01.py:


=======================
Simple Axis Direction01
=======================





.. image:: /gallery/userdemo/images/sphx_glr_simple_axis_direction01_001.png
    :align: center





.. code-block:: python

    import matplotlib.pyplot as plt
    import mpl_toolkits.axisartist as axisartist

    fig = plt.figure(figsize=(4, 2.5))
    ax1 = fig.add_subplot(axisartist.Subplot(fig, "111"))
    fig.subplots_adjust(right=0.8)

    ax1.axis["left"].major_ticklabels.set_axis_direction("top")
    ax1.axis["left"].label.set_text("Label")

    ax1.axis["right"].label.set_visible(True)
    ax1.axis["right"].label.set_text("Label")
    ax1.axis["right"].label.set_axis_direction("left")

    plt.show()

**Total running time of the script:** ( 0 minutes  0.026 seconds)



.. container:: sphx-glr-footer


  .. container:: sphx-glr-download

     :download:`Download Python source code: simple_axis_direction01.py <simple_axis_direction01.py>`



  .. container:: sphx-glr-download

     :download:`Download Jupyter notebook: simple_axis_direction01.ipynb <simple_axis_direction01.ipynb>`

.. rst-class:: sphx-glr-signature

    `Generated by Sphinx-Gallery <https://sphinx-gallery.readthedocs.io>`_
