.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "intro/matplotlib/auto_examples/plot_axes.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end <sphx_glr_download_intro_matplotlib_auto_examples_plot_axes.py>` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_intro_matplotlib_auto_examples_plot_axes.py: Simple axes example ==================== This example shows a couple of simple usage of axes. .. GENERATED FROM PYTHON SOURCE LINES 8-26 .. image-sg:: /intro/matplotlib/auto_examples/images/sphx_glr_plot_axes_001.png :alt: plot axes :srcset: /intro/matplotlib/auto_examples/images/sphx_glr_plot_axes_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt plt.axes((0.1, 0.1, 0.8, 0.8)) plt.xticks([]) plt.yticks([]) plt.text( 0.6, 0.6, "axes([0.1, 0.1, 0.8, 0.8])", ha="center", va="center", size=20, alpha=0.5 ) plt.axes((0.2, 0.2, 0.3, 0.3)) plt.xticks([]) plt.yticks([]) plt.text( 0.5, 0.5, "axes([0.2, 0.2, 0.3, 0.3])", ha="center", va="center", size=16, alpha=0.5 ) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.042 seconds) .. _sphx_glr_download_intro_matplotlib_auto_examples_plot_axes.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_axes.ipynb <plot_axes.ipynb>` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_axes.py <plot_axes.py>` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_axes.zip <plot_axes.zip>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_