text against colorbar

Arg, I hoped that you would not say that :slight_smile: Le Mardi 19

It's not too bad, actually:

from pylab import figure, show, nx, cm
from matplotlib.transforms import blend_xy_sep_transform
fig = figure()
ax = fig.add_subplot(111)
X = 100*nx.mlab.randn(256,256)
im = ax.imshow(X, cmap=cm.jet)
cax = fig.colorbar(im)
labels = (100., 'peak1'), (-100, 'peak2')

trans = blend_xy_sep_transform(cax.transAxes, cax.transData)
for y, label in labels:
    cax.text(-0.05, y, label, ha='right', va='center', transform=trans)
show()