8000 Documentation edit for matshow function by Impaler343 · Pull Request #27857 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Documentation edit for matshow function #27857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2433,12 +2433,20 @@ def imsave(

def matshow(A: ArrayLike, fignum: None | int = None, **kwargs) -> AxesImage:
"""
Display an array as a matrix in a new figure window.
Display a 2D array as a matrix in a new figure window.

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.
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:

.. code-block:: none

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.

Tick labels for the xaxis are placed on top.

Expand Down
0