Since no one has answered you, here is a good starting point:
import numpy as np
import matplotlib.cm as cm
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
z = np.random.rand(10, 10) # generate random data
nx, ny = z.shape
indx, indy = np.arange(nx), np.arange(ny)
x, y = np.meshgrid(indx, indy)
fig, ax = plt.subplots()
ax.imshow(z.T, interpolation="nearest", cmap=cm.YlGn) # plot grid values
for xval, yval in zip(x.flatten(), y.flatten()):
zval = z[xval, yval]
t = "%.1f%%"%(zval * 100,) # format value with 1 decimal point
c = 'w' if zval > 0.75 else 'k' # if dark-green, change text color to white
ax.text(xval, yval, t, color=c, va='center', ha='center')
xlabels = 'abcdefghij'
ylabels = '0123456789'
ax.set_xticks(indx+0.5) # offset x/y ticks so gridlines run on border of boxes
ax.set_yticks(indy+0.5)
ax.grid(ls='-', lw=2)
# the tick labels, if you want them centered need to be adjusted in
# this special way.
for a, ind, labels in zip((ax.xaxis, ax.yaxis), (indx, indy),
(xlabels, ylabels)):
a.set_major_formatter(ticker.NullFormatter())
a.set_minor_locator(ticker.FixedLocator(ind))
a.set_minor_formatter(ticker.FixedFormatter(labels))
ax.xaxis.tick_top()
plt.show()