Creating a heat map using pylab

I have a 2d dataset that I would like to build as a heatmap using pylab. I found solutions for using regular points to create a heat map, but not to map f(x,y) = heat to a heat map.

PS: ipython is cool to do such things in combination with pylab :)

+8
python matplotlib ipython heatmap
source share
1 answer

It turns out pretty easy:

 import pylab as pl data = pl.random((25,25)) # 25x25 matrix of values pl.pcolor(data) pl.colorbar() pl.show() 
+17
source share

All Articles