Matplotlib Heatmap

This example demonstrates how to use the Matplotlib library to create a heatmap.

Python
import numpy as np
import matplotlib.pyplot as plt

# Data
data = np.random.rand(10, 6)

# Create heatmap
plt.imshow(data, cmap='hot', interpolation='nearest')
plt.colorbar()
plt.title('Heatmap')
plt.show()
AI Prompt