Hi all,
When creating a new colormap, with a script based on the example given here:
http://www.scipy.org/Cookbook/Matplotlib/Show_colormaps
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/Tkinter.py", line 1413, in __call__
return self.func(*args)
File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_tkagg.py", line 212, in resize
self.show()
File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_tkagg.py", line 215, in draw
FigureCanvasAgg.draw(self)
File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_agg.py", line 314, in draw
self.figure.draw(self.renderer)
File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in draw_wrapper
draw(artist, renderer, *kl)
File "/usr/lib/pymodules/python2.6/matplotlib/figure.py", line 774, in draw
for a in self.axes: a.draw(renderer)
File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in draw_wrapper
draw(artist, renderer, *kl)
File "/usr/lib/pymodules/python2.6/matplotlib/axes.py", line 1721, in draw
a.draw(renderer)
File "/usr/lib/pymodules/python2.6/matplotlib/collections.py", line 699, in draw
return Collection.draw(self, renderer)
File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in draw_wrapper
draw(artist, renderer, *kl)
File "/usr/lib/pymodules/python2.6/matplotlib/collections.py", line 201, in draw
self.update_scalarmappable()
File "/usr/lib/pymodules/python2.6/matplotlib/collections.py", line 477, in update_scalarmappable
self._facecolors = self.to_rgba(self._A, self._alpha)
File "/usr/lib/pymodules/python2.6/matplotlib/cm.py", line 167, in to_rgba
x = self.cmap(x, alpha=alpha, bytes=bytes)
File "/usr/lib/pymodules/python2.6/matplotlib/colors.py", line 488, in __call__
if not self._isinit: self._init()
File "/usr/lib/pymodules/python2.6/matplotlib/colors.py", line 632, in _init
self._lut[:-3, 2] = makeMappingArray(self.N, self._segmentdata['blue'])
File "/usr/lib/pymodules/python2.6/matplotlib/colors.py", 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!
Marius.