Reputation: 17617
I have a matrix of size >>> X.shape (2194, 100) >>>
I would like to plot it on square. How can I do that?
This is what I have tried
plt.matshow(X)
plt.show()
but the figure respects the ratio of the axis. I would like instead a squared figure.
Upvotes: 0
Views: 273
Reputation: 3994
plt.imshow(X, aspect='auto', interpolation='None')
plt.colorbar()
plt.show()
This should give you what you want
Upvotes: 1