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

.. only:: html

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

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

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

.. _sphx_glr_gallery_axisartist_simple_axisartist1.py:


==================
Simple Axisartist1
==================

.. GENERATED FROM PYTHON SOURCE LINES 7-28



.. image:: /gallery/axisartist/images/sphx_glr_simple_axisartist1_001.png
    :alt: simple axisartist1
    :class: sphx-glr-single-img





.. code-block:: default

    import matplotlib.pyplot as plt
    from mpl_toolkits import axisartist

    fig = plt.figure()
    fig.subplots_adjust(right=0.85)
    ax = axisartist.Subplot(fig, 1, 1, 1)
    fig.add_subplot(ax)

    # make some axis invisible
    ax.axis["bottom", "top", "right"].set_visible(False)

    # make an new axis along the first axis axis (x-axis) which pass
    # through y=0.
    ax.axis["y=0"] = ax.new_floating_axis(nth_coord=0, value=0,
                                          axis_direction="bottom")
    ax.axis["y=0"].toggle(all=True)
    ax.axis["y=0"].label.set_text("y = 0")

    ax.set_ylim(-2, 4)

    plt.show()


.. _sphx_glr_download_gallery_axisartist_simple_axisartist1.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: simple_axisartist1.py <simple_axisartist1.py>`



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

     :download:`Download Jupyter notebook: simple_axisartist1.ipynb <simple_axisartist1.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>`_
