GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Installation
  • Documentation
  • Examples
  • Tutorials
  • Contributing

This view

  • Original page
  • New address

GeezerVison is showing matplotlib.org — matplotlib.pyplot.figimage — Matplotlib 3.1.2 documentation

You are reading an old version of the documentation (v3.1.1). For the latest version see https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.figimage.html
Version 3.1.2
matplotlib
Fork me on GitHub

Navigation

  • index
  • modules |
  • next |
  • previous |
  • home| 
  • contents »
  • API Overview »
  • matplotlib.pyplot »
  • matplotlib.pyplot »

Quick search

Table of Contents

  • matplotlib.pyplot.figimage
    • Examples using matplotlib.pyplot.figimage

Related Topics

  • Documentation overview
    • API Overview
      • matplotlib.pyplot
        • matplotlib.pyplot
          • Previous: matplotlib.pyplot.eventplot
          • Next: matplotlib.pyplot.figlegend
Show Page Source

matplotlib.pyplot.figimage¶

matplotlib.pyplot.figimage(*args, **kwargs)[source]¶

Add a non-resampled image to the figure.

The image is attached to the lower or upper left corner depending on origin.

Parameters:
X

The image data. This is an array of one of the following shapes:

  • MxN: luminance (grayscale) values
  • MxNx3: RGB values
  • MxNx4: RGBA values
xo, yo : int

The x/y image offset in pixels.

alpha : None or float

The alpha blending value.

norm : matplotlib.colors.Normalize

A Normalize instance to map the luminance to the interval [0, 1].

cmap : str or matplotlib.colors.Colormap

The colormap to use. Default: rcParams["image.cmap"] = 'viridis'.

vmin, vmax : scalar

If norm is not given, these values set the data limits for the colormap.

origin : {'upper', 'lower'}

Indicates where the [0, 0] index of the array is in the upper left or lower left corner of the axes. Defaults to rcParams["image.origin"] = 'upper'.

resize : bool

If True, resize the figure to match the given image size.

Returns:
matplotlib.image.FigureImage
Other Parameters:
**kwargs

Additional kwargs are Artist kwargs passed on to FigureImage.

Notes

figimage complements the axes image (imshow()) which will be resampled to fit the current axes. If you want a resampled image to fill the entire figure, you can define an Axes with extent [0,0,1,1].

Examples:

f = plt.figure()
nx = int(f.get_figwidth() * f.dpi)
ny = int(f.get_figheight() * f.dpi)
data = np.random.random((ny, nx))
f.figimage(data)
plt.show()

Examples using matplotlib.pyplot.figimage¶

../../_images/sphx_glr_figimage_demo_thumb.png

Figimage Demo

© Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 2012 - 2018 The Matplotlib development team.
Last updated on Jan 05, 2020. Created using Sphinx 1.8.5. Doc version v3.1.1-79-g90d53b526.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.