matplotlib 3.5.1

ReturnsBackRef
_make_image(self, A, in_bbox, out_bbox, clip_bbox, magnification=1.0, unsampled=False, round_to_pixel_border=True)

A may be a greyscale image (M, N) with a dtype of float32, float64, float128, uint16 or uint8, or an (M, N, 4) RGBA image with a dtype of float32, float64, float128, or uint8.

If unsampled is True, the image will not be scaled, but an appropriate affine transformation will be returned instead.

If round_to_pixel_border is True, the output image size will be rounded to the nearest pixel boundary. This makes the images align correctly with the axes. It should not be used if exact scaling is needed, such as for FigureImage .

Returns

image : (M, N, 4) uint8 array

The RGBA image, resampled unless unsampled is True.

x, y : float

The upper left corner where the image should be drawn, in pixel space.

trans : Affine2D

The affine transformation from image to pixel space.

Normalize, rescale, and colormap the image A from the given in_bbox (in data space), to the given out_bbox (in pixel space) clipped to the given clip_bbox (also in pixel space), and magnified by the magnification factor.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

matplotlib.image._ImageBase._get_scalar_alpha

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/image.py#310
type: <class 'function'>
Commit: