Suresh, This is baffling, and particularly annoying for someone just starting out with mpl. I don't think there is any problem with the barchart code--the demo works for me with numarray--and I don't see anything obvious in the traceback. Are your matplotlib and numarray both from Mandriva packages?
I would be inclined to download numpy and matplotlib as nice, fresh tarballs, uninstall any previous versions (including numarray), build and install numpy, and then do the same for matplotlib. If you have not done this before you will probably trip over some missing -devel packages (furnishing header files for python, gtk, etc), but once all that is straightened out it should go smoothly. Eric [EMAIL PROTECTED] wrote: > I receive an error when trying to plot barcharts. To confirm it was > nothing to do with my code, I tried running one of the demos provided and > received the same error: > > $ python barchart_demo.py > Traceback (most recent call last): > File "barchart_demo.py", line 11, in ? > p1 = bar(ind, menMeans, width, color='r', yerr=menStd) > File "/usr/lib64/python2.4/site-packages/matplotlib/pylab.py", line > 1641, in bar > ret = gca().bar(*args, **kwargs) > File "/usr/lib64/python2.4/site-packages/matplotlib/axes.py", line 2485, > in bar > xerr = asarray([xerr]*nbars, Float) > File "/usr/lib64/python2.4/site-packages/numarray/numarraycore.py", line > 434, in asarray > return array(seq, type=type, typecode=typecode, copy=0, dtype=dtype) > File "/usr/lib64/python2.4/site-packages/numarray/numarraycore.py", line > 417, in array > return fromlist(sequence,type,shape) > File "/usr/lib64/python2.4/site-packages/numarray/numarraycore.py", line > 267, in fromlist > arr.fromlist(seq) > ValueError: Invalid sequence. > > Can't figure out the issue in numarray it is encountering. > > I am brand spanking new to matplotlib and using python for scientific > computing (amazing product; can't believe I didn't know about it before.) > and would appreciate some help in getting started. I apologise if it's > something basic (couldn't find anything on google). > > python 2.4.3 > matplotlib 0.87.4 > numarray-1.5.2 > (Mandriva 2007 x64-64) > > Thanks, > Suresh > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users