sample colormap code is broken

When I try to run the sample custom colormap code provided at
http://matplotlib.sourceforge.net/examples/pylab_examples/custom_cmap.html ,
I get the following error message:

AttributeError Traceback (most recent call last)

colormaps.py in <module>()
    114
    115 blue_red2 = LinearSegmentedColormap('BlueRed2', cdict2)
--> 116 plt.register_cmap(cmap=blue_red2)
    117
    118 # Third, for LinearSegmentedColormap only,

AttributeError: 'module' object has no attribute 'register_cmap'
WARNING: Failure executing file: <colormaps.py>

···

--
View this message in context: http://www.nabble.com/sample-colormap-code-is-broken-tp25630022p25630022.html
Sent from the matplotlib - users mailing list archive at Nabble.com.