As one can see in this sample code since 0 is somewhere in the spectrum it is hard to trace which points are negative and which are positive. Although my real plot is more c
there is a lot of good example material on simple self-defined segmented color bars on the matplotlib documentation pages
for instance
http://matplotlib.org/examples/api/colorbar_only.html http://matplotlib.org/examples/pylab_examples/contourf_demo.html
EDIT:
from what I understand, this might be the perfect example for what you are looking for:
http://matplotlib.org/examples/pylab_examples/custom_cmap.html
Ok for the future reference. I used diverging maps as part of it as @tcaswell suggested. You can look to the above links.
import numpy as np
from matplotlib import pyplot as plt
from matplotlib.colors import BoundaryNorm
a=np.random.randn(2500).reshape((50,50))
# define the colormap
cmap = plt.get_cmap('PuOr')
# extract all colors from the .jet map
cmaplist = [cmap(i) for i in range(cmap.N)]
# create the new map
cmap = cmap.from_list('Custom cmap', cmaplist, cmap.N)
# define the bins and normalize and forcing 0 to be part of the colorbar!
bounds = np.arange(np.min(a),np.max(a),.5)
idx=np.searchsorted(bounds,0)
bounds=np.insert(bounds,idx,0)
norm = BoundaryNorm(bounds, cmap.N)
plt.imshow(a,interpolation='none',norm=norm,cmap=cmap)
plt.colorbar()
plt.show()