error using LinearSegmentedColormap example from SciPy Cookbook

Hi all,

When creating a new colormap, with a script based on the example given here:

When plotting the data, and when adding the colobar, I get this error:

In [27]: Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.6/lib-tk/", line 1413, in __call__
    return self.func(*args)
  File "/usr/lib/pymodules/python2.6/matplotlib/backends/", line 212, in resize
  File "/usr/lib/pymodules/python2.6/matplotlib/backends/", line 215, in draw
  File "/usr/lib/pymodules/python2.6/matplotlib/backends/", line 314, in draw
  File "/usr/lib/pymodules/python2.6/matplotlib/", line 46, in draw_wrapper
    draw(artist, renderer, *kl)
  File "/usr/lib/pymodules/python2.6/matplotlib/", line 774, in draw
    for a in self.axes: a.draw(renderer)
  File "/usr/lib/pymodules/python2.6/matplotlib/", line 46, in draw_wrapper
    draw(artist, renderer, *kl)
  File "/usr/lib/pymodules/python2.6/matplotlib/", line 1721, in draw
  File "/usr/lib/pymodules/python2.6/matplotlib/", line 699, in draw
    return Collection.draw(self, renderer)
  File "/usr/lib/pymodules/python2.6/matplotlib/", line 46, in draw_wrapper
    draw(artist, renderer, *kl)
  File "/usr/lib/pymodules/python2.6/matplotlib/", line 201, in draw
  File "/usr/lib/pymodules/python2.6/matplotlib/", line 477, in update_scalarmappable
    self._facecolors = self.to_rgba(self._A, self._alpha)
  File "/usr/lib/pymodules/python2.6/matplotlib/", line 167, in to_rgba
    x = self.cmap(x, alpha=alpha, bytes=bytes)
  File "/usr/lib/pymodules/python2.6/matplotlib/", line 488, in __call__
    if not self._isinit: self._init()
  File "/usr/lib/pymodules/python2.6/matplotlib/", line 632, in _init
    self._lut[:-3, 2] = makeMappingArray(self.N, self._segmentdata['blue'])
  File "/usr/lib/pymodules/python2.6/matplotlib/", line 416, in makeMappingArray
    raise TypeError("data must be convertable to an array")
TypeError: data must be convertable to an array

When I don't change the example from the cookbook, I still get the same error, and no image. Previously, I didn't get this error. I'm using Python 2.6 and MPL 0.99.0 on Ubuntu 9.10.

Any help would be great!