data = np.random.random_sample((25, 25))
rows, cols = np.indices((25, 25))
data[np.diag(rows, k=0), np.diag(cols, k=0)] = 0
colors = ['white'] + [cm.jet(i) for i in range(1, 256)]
new_map = matplotlib.colors.LinearSegmentedColormap.from_list('new_map',
    colors, N=256)
pcolor(data, cmap=new_map)
colorbar()
savefig('map.png')
show()
Make reverse diagonals white in heatmap