Matplotlib - Image Display
The code below is intended to show an image with the 'hot' colormap and a colorbar, but it raises an error. What is the problem?
import matplotlib.pyplot as plt import numpy as np image = np.random.rand(3,3) plt.imshow(image, cmap=hot) plt.colorbar() plt.show()
