I've encountered today in my matplotlib this bug: http://article.gmane.org/gmane.comp.python.matplotlib.general/7308 and solution there helps.
Please, post the description of the problem on the bug, rather then referring to third-party links.
That's what the link says: From: Eric Firing <efiring@...> Subject: Re: Type Error Newsgroups: gmane.comp.python.matplotlib.general Date: 2006-11-13 17:48:07 GMT (2 weeks, 6 days, 6 hours and 23 minutes ago) Luca, It is a bug that appears when recent mpl is used with Numeric as opposed to numpy or numarray. It is fixed in svn. Your possible solutions are: 1) Use numpy or numarray instead of Numeric 2) Build mpl from svn 3) Edit axes.py as indicated in this diff chunk: <at> <at> -1217,7 +1217,7 <at> <at> ACCEPTS: len(2) sequence of floats """ - if xmax is None and hasattr(xmin,'__len__'): + if xmax is None and iterable(xmin): xmin,xmax = xmin old_xmin,old_xmax = self.get_xlim() <at> <at> -1330,7 +1330,7 <at> <at> ACCEPTS: len(2) sequence of floats """ - if ymax is None and hasattr(ymin,'__len__'): + if ymax is None and iterable(ymin): ymin,ymax = ymin old_ymin,old_ymax = self.get_ylim() Eric lucaberto@... wrote: > Hello I have installed matplotlib on su 10.0 > > when i do only this example > > from pylab import * > plot([1,2,3]) > > i get this error: > only length-1 attays can be converted to Python scalars. > > How i have made wrong? > > Regards > > Luca
fixed in matplotlib-0.90.0, now in cvs.