Matplotlib - Image Display
Which of the following is the correct way to apply the 'viridis' colormap to an image using matplotlib?
plt.imshow() is cmap, and it expects a string name.cmap='viridis' is correct. Using color or colormap is incorrect, and omitting quotes causes an error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions