This code shows three plots side by side. Each uses a different colormap type to help see data in different ways.
import matplotlib.pyplot as plt
import numpy as np
# Create example data
np.random.seed(0)
data = np.random.rand(10, 10)
# Plot with sequential colormap
plt.subplot(1, 3, 1)
plt.title('Sequential (viridis)')
plt.imshow(data, cmap='viridis')
plt.colorbar()
# Plot with diverging colormap
plt.subplot(1, 3, 2)
plt.title('Diverging (coolwarm)')
plt.imshow(data - 0.5, cmap='coolwarm') # Center around zero
plt.colorbar()
# Plot with qualitative colormap
categories = np.random.randint(0, 10, (10, 10))
plt.subplot(1, 3, 3)
plt.title('Qualitative (tab10)')
plt.imshow(categories, cmap='tab10')
plt.colorbar(ticks=range(10))
plt.tight_layout()
plt.show()