
.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "gallery/axisartist/axis_direction_demo_step01.py"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        Click :ref:`here <sphx_glr_download_gallery_axisartist_axis_direction_demo_step01.py>`
        to download the full example code

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_gallery_axisartist_axis_direction_demo_step01.py:


==========================
Axis Direction Demo Step01
==========================

.. GENERATED FROM PYTHON SOURCE LINES 7-33



.. image:: /gallery/axisartist/images/sphx_glr_axis_direction_demo_step01_001.png
    :alt: axis direction demo step01
    :class: sphx-glr-single-img





.. code-block:: default

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


    def setup_axes(fig, rect):
        ax = axisartist.Subplot(fig, rect)
        fig.add_axes(ax)

        ax.set_ylim(-0.1, 1.5)
        ax.set_yticks([0, 1])

        ax.axis[:].set_visible(False)

        ax.axis["x"] = ax.new_floating_axis(1, 0.5)
        ax.axis["x"].set_axisline_style("->", size=1.5)

        return ax


    fig = plt.figure(figsize=(3, 2.5))
    fig.subplots_adjust(top=0.8)
    ax1 = setup_axes(fig, 111)

    ax1.axis["x"].set_axis_direction("left")

    plt.show()


.. _sphx_glr_download_gallery_axisartist_axis_direction_demo_step01.py:


.. only :: html

 .. container:: sphx-glr-footer
    :class: sphx-glr-footer-example



  .. container:: sphx-glr-download sphx-glr-download-python

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



  .. container:: sphx-glr-download sphx-glr-download-jupyter

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


.. only:: html

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

    Keywords: matplotlib code example, codex, python plot, pyplot
    `Gallery generated by Sphinx-Gallery
    <https://sphinx-gallery.readthedocs.io>`_
