Here is how an array is indexed and how the resulting imshow
or matshow
plot looks like. The array here is of shape (7,5), so you have 7 rows and 5 columns. Columns are x
, and rows are y
.
Here is the difference between imshow
and matshow
, imshow
has the x ticklabels on the bottom of the graph.
You may transpose an array to have the columns turned into rows and vice versa. If A
is your array and you have import
ed numpy as np
, do
A = np.array(A).T
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…