matplotlib 3.5.1

Parameters
draw_image(self, gc, x, y, im, transform=None)

Parameters

gc : `.GraphicsContextBase`

A graphics context with clipping information.

x : scalar

The distance in physical units (i.e., dots or pixels) from the left hand side of the canvas.

y : scalar

The distance in physical units (i.e., dots or pixels) from the bottom side of the canvas.

im : (N, M, 4) array-like of np.uint8

An array of RGBA pixels.

transform : `matplotlib.transforms.Affine2DBase`

If and only if the concrete backend is written such that option_scale_image returns True , an affine transformation (i.e., an .Affine2DBase ) may be passed to draw_image . The translation vector of the transformation is given in physical units (i.e., dots or pixels). Note that the transformation does not override x and y, and has to be applied before translating the result by x and y (this can be accomplished by adding x and y to the translation vector defined by transform).

Draw an RGBA image.

Examples

See :

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/backend_bases.py#460
type: <class 'function'>
Commit: