Building your own functions with matplotlib

I am trying to build my own functions with matplotlib, basically I have a 2D matrix, and I would like to build it with something very similar to a heat map, but the cells are separated and recognizable. See for example:

http://www.cl.cam.ac.uk/~nv240/pics/eigenbehaviour.jpg

+5
source share
1 answer

Is that what you are after?

enter image description here

from pylab import *

z = rand(10, 25)

c = pcolor(z)
set_cmap('hot')
colorbar()
c = pcolor(z, edgecolors='w', linewidths=1)
axis([0,25,0,10])
savefig('plt.png')
show()
+6
source

All Articles