.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_intro_matplotlib_auto_examples_plot_axes-2.py: Axes ==== This example shows various axes command to position matplotlib axes. .. image:: /intro/matplotlib/auto_examples/images/sphx_glr_plot_axes-2_001.png :class: sphx-glr-single-img .. code-block:: python import matplotlib.pyplot as plt plt.axes([.1, .1, .5, .5]) plt.xticks([]) plt.yticks([]) plt.text(.1, .1, 'axes([0.1, 0.1, 0.5, 0.5])', ha='left', va='center', size=16, alpha=.5) plt.axes([.2, .2, .5, .5]) plt.xticks([]) plt.yticks([]) plt.text(.1, .1, 'axes([0.2, 0.2, 0.5, 0.5])', ha='left', va='center', size=16, alpha=.5) plt.axes([.3, .3, .5, .5]) plt.xticks([]) plt.yticks([]) plt.text(.1, .1, 'axes([0.3, 0.3, 0.5, 0.5])', ha='left', va='center', size=16, alpha=.5) plt.axes([.4, .4, .5, .5]) plt.xticks([]) plt.yticks([]) plt.text(.1, .1, 'axes([0.4, 0.4, 0.5, 0.5])', ha='left', va='center', size=16, alpha=.5) plt.show() **Total running time of the script:** ( 0 minutes 0.086 seconds) .. _sphx_glr_download_intro_matplotlib_auto_examples_plot_axes-2.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: plot_axes-2.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: plot_axes-2.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_