### Bug summary matshow states that "(first dimension of the array) are displayed horizontally": https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.matshow.html#matplotlib-pyplot-matshow. However it seems that the first dimension is vertically. ### Code for reproduction ```Python import numpy as np import matplotlib.pyplot as plt nx = 15 ny = 21 img = np.zeros((nx, ny)) for i in range(nx): for j in range(ny): if j == i: img[i, j] = 1 plt.figure() plt.subplot(1, 2, 1) plt.imshow(img) plt.title('imshow') plt.subplot(1, 2, 2) plt.matshow(img, fignum=0) plt.title('matshow') plt.show() ``` ### Actual outcome First dimension is shown vertically ### Expected outcome I would expect that the first dimension be show horizontally according to the documentation. ### Additional information _No response_ ### Operating system Debian 12 ### Matplotlib Version 3.8.0 ### Matplotlib Backend module://matplotlib_inline.backend_inline ### Python version 3.10.12 ### Jupyter version _No response_ ### Installation conda