2808 explained code solutions for 75 technologies


python-matplotlibHow to plot heatmap


import matplotlib.pyplot as plt

fig, ax = plt.subplots()
im = ax.imshow([[0.8, 2.4, 2.5], [1.3, 1.2, 0.0], [0.1, 2.0, 0.0]])

plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities

.subplots(

creates set of charts on a single chart area

.imshow(

displays data as an image (used for heatmaps from 2d arrays)

.show()

render chart in a separate window