sample colormap code is broken

When I try to run the sample custom colormap code provided at ,
I get the following error message:

AttributeError Traceback (most recent call last) in <module>()
    115 blue_red2 = LinearSegmentedColormap('BlueRed2', cdict2)
--> 116 plt.register_cmap(cmap=blue_red2)
    118 # Third, for LinearSegmentedColormap only,

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


View this message in context:
Sent from the matplotlib - users mailing list archive at