mpl.image

The image module supports basic image loading, rescaling and display operations.

Functions

allow_rasterization(draw) Decorator for Artist.draw method.
from_images(numrows, numcols, seq) return an image instance with numrows, numcols from a seq of image
fromarray(A, isoutput) Load the image from a numpy array By default this function fills the input buffer, which can subsequently be resampled using resize.
frombuffer(buffer, width, height, isoutput) Load the image from a character buffer By default this function fills the input buffer, which can subsequently be resampled using resize.
frombyte(A, isoutput) Load the image from a byte array.
imread(fname[, format]) Read an image from a file into an array.
imsave(fname, arr[, vmin, vmax, cmap, ...]) Save an array as in image file.
pcolor(x, y, data, rows, cols, bounds) Generate a pseudo-color image from data on a non-uniform grid using nearest neighbour or linear interpolation.
pcolor2(x, y, data, rows, cols, bounds, bg) Generate a pseudo-color image from data on a non-uniform grid specified by its cell boundaries.
pil_to_array(pilImage) Load a PIL image and return it as a numpy array.
thumbnail(infile, thumbfile[, scale, ...]) make a thumbnail of image in infile with output filename
urlopen(url[, data, timeout, cafile, ...])
urlparse(url[, scheme, allow_fragments]) Parse a URL into 6 components: <scheme>://<netloc>/<path>;<params>?<query>#<fragment> Return a 6-tuple: (scheme, netloc, path, params, query, fragment).

Classes

AxesImage(ax[, cmap, norm, interpolation, ...])
Bbox(points, **kwargs) A mutable bounding box.
BboxBase([shorthand_name]) This is the base class of all bounding boxes, and provides read-only access to its data.
BboxImage(bbox[, cmap, norm, interpolation, ...]) The Image class whose size is determined by the given bbox.
BytesIO Create a buffered I/O implementation using an in-memory bytes buffer, ready for reading and writing.
FigureImage(fig[, cmap, norm, offsetx, ...])
IdentityTransform(*args, **kwargs) A special class that does on thing, the identity transform, in a fast way.
Image
NonUniformImage(ax, **kwargs)
PcolorImage(ax[, x, y, A, cmap, norm]) Make a pcolor-style plot with an irregular rectangular grid.