

.. _sphx_glr_gallery_images_contours_and_fields_figimage_demo.py:


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

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





.. image:: /gallery/images_contours_and_fields/images/sphx_glr_figimage_demo_001.png
    :align: center





.. code-block:: python

    import numpy as np
    import matplotlib
    import matplotlib.cm as cm
    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()

**Total running time of the script:** ( 0 minutes  0.001 seconds)



.. container:: sphx-glr-footer


  .. container:: sphx-glr-download

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



  .. container:: sphx-glr-download

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

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

    `Generated by Sphinx-Gallery <https://sphinx-gallery.readthedocs.io>`_
