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

.. only:: html

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

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

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

.. _sphx_glr_gallery_images_contours_and_fields_figimage_demo.py:


=============
Figimage Demo
=============

This illustrates placing images directly in the figure, with no Axes objects.

.. GENERATED FROM PYTHON SOURCE LINES 9-23

.. code-block:: default

    import numpy as np
    import matplotlib
    import matplotlib.pyplot as plt


    fig = plt.figure()
    Z = np.arange(10000).reshape((100, 100))
    Z[:, 50:] = 1

    im1 = fig.figimage(Z, xo=50, yo=0, origin='lower')
    im2 = fig.figimage(Z, xo=100, yo=100, alpha=.8, origin='lower')

    plt.show()




.. image:: /gallery/images_contours_and_fields/images/sphx_glr_figimage_demo_001.png
    :alt: figimage demo
    :class: sphx-glr-single-img





.. GENERATED FROM PYTHON SOURCE LINES 24-31

------------

References
""""""""""

The use of the following functions, methods, classes and modules is shown
in this example:

.. GENERATED FROM PYTHON SOURCE LINES 32-36

.. code-block:: default


    matplotlib.figure.Figure
    matplotlib.figure.Figure.figimage
    matplotlib.pyplot.figimage




.. rst-class:: sphx-glr-script-out

 Out:

 .. code-block:: none


    <function figimage at 0x7f73be8161f0>




.. _sphx_glr_download_gallery_images_contours_and_fields_figimage_demo.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: figimage_demo.py <figimage_demo.py>`



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

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