matplotlib.pyplot.matshow
- matplotlib.pyplot.matshow(A, fignum=None, **kwargs)
Display a 2D array as a matrix in a new figure window.
The origin is set at the upper left hand corner. The indexing is
(row, column)so that the first index runs vertically and the second index runs horizontally in the figure:A[0, 0] ⋯ A[0, M-1] ⋮ ⋮ A[N-1, 0] ⋯ A[N-1, M-1]The aspect ratio of the figure window is that of the array, unless this would make an excessively short or narrow figure.