matplotlib 3.5.1

Other ParametersParametersReturnsBackRef
matshow(A, fignum=None, **kwargs)

The origin is set at the upper left hand corner and rows (first dimension of the array) are displayed horizontally. The aspect ratio of the figure window is that of the array, unless this would make an excessively short or narrow figure.

Tick labels for the xaxis are placed on top.

Other Parameters

**kwargs : `~matplotlib.axes.Axes.imshow` arguments

Parameters

A : 2D array-like

The matrix to be displayed.

fignum : None or int or False

If None, create a new figure window with automatic numbering.

If a nonzero integer, draw into the figure with the given number (create it if it does not exist).

If 0, use the current axes (or create one if it does not exist).

note

Because of how :None:None:`.Axes.matshow` tries to set the figure aspect ratio to be the one of the array, strange things may happen if you reuse an existing figure.

Returns

`~matplotlib.image.AxesImage`

Display an array as a matrix in a new figure window.

Examples

See :

Back References

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

matplotlib.pyplot.imshow matplotlib.pyplot.plotting

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