Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plotting eigenbehaviours with matplotlib

I'm trying to plot eigenbehaviors with matplotlib, basically I have a 2D matrix and would like to plot it with something very similar to a heat map, but the cells are divided and recognizable. See for example:

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

like image 227
marcorossi Avatar asked May 25 '12 15:05

marcorossi


1 Answers

Is this 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()
like image 57
fraxel Avatar answered Sep 20 '22 03:09

fraxel