contourf cmap.set_under

following the example [1] i can't get the
colorbar extend colors to show properly.

here is what i did:

import matplotlib.pyplot as plt
import matplotlib.cm as cm
levels = np.linspace(.01,.69,10)
<...>
im = plt.contourf(x, y, z, levels, extend='both', cmap=cm.BuPu)
im.cmap.set_under('yellow')
im.cmap.set_over('cyan')

what am i missing?

thank you, best regards, yoshi

[1] http://matplotlib.sourceforge.net/examples/pylab_examples/contourf_demo.html

PS
if i have something like:

mymap = matplotlib.colors.LinearSegmentedColormap('MyMap', cmdat, 256)
mymap.set_under('yellow')
mymap.set_over('cyan')

also doesn't work ...