How to plot a 2d matrix in python with colorbar? (like imagesc in Matlab)
Another possibility is to use plt.matshow()
import numpy as np
import matplotlib.pyplot as plt
plt.matshow(np.random.random((50,50)));
plt.colorbar()
plt.show()
https://matplotlib.org/api/_as_gen/matplotlib.pyplot.matshow.html
import numpy as np
import matplotlib.pyplot as plt
plt.imshow(np.random.random((50,50)))
plt.colorbar()
plt.show()