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

.. only:: html

    .. meta::
        :keywords: codex

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

        :ref:`Go to the end <sphx_glr_download_gallery_scales_aspect_loglog.py>`
        to download the full example code.

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

.. _sphx_glr_gallery_scales_aspect_loglog.py:


=============
Loglog aspect
=============

.. GENERATED FROM PYTHON SOURCE LINES 7-27



.. image-sg:: /gallery/scales/images/sphx_glr_aspect_loglog_001.png
   :alt: adjustable = box, adjustable = datalim
   :srcset: /gallery/scales/images/sphx_glr_aspect_loglog_001.png, /gallery/scales/images/sphx_glr_aspect_loglog_001_2_00x.png 2.00x
   :class: sphx-glr-single-img





.. code-block:: Python

    import matplotlib.pyplot as plt

    fig, (ax1, ax2) = plt.subplots(1, 2)
    ax1.set_xscale("log")
    ax1.set_yscale("log")
    ax1.set_xlim(1e1, 1e3)
    ax1.set_ylim(1e2, 1e3)
    ax1.set_aspect(1)
    ax1.set_title("adjustable = box")

    ax2.set_xscale("log")
    ax2.set_yscale("log")
    ax2.set_adjustable("datalim")
    ax2.plot([1, 3, 10], [1, 9, 100], "o-")
    ax2.set_xlim(1e-1, 1e2)
    ax2.set_ylim(1e-1, 1e3)
    ax2.set_aspect(1)
    ax2.set_title("adjustable = datalim")

    plt.show()


.. _sphx_glr_download_gallery_scales_aspect_loglog.py:

.. only:: html

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

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

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

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

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

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: aspect_loglog.zip <aspect_loglog.zip>`


.. only:: html

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

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
