Hi,
I'm trying to plot some horizontal bars using the .bar() method:
import matplotlib.pyplot as plt
fig=plt.figure()
ax=fig.add_subplot(1,1,1)
ax.bar([1,2,3],[4,6,5],orientation='horizontal')
raises an AssertionError:
AssertionError Traceback (most recent call last)
/home/ernest/<ipython console> in <module>()
/usr/lib/pymodules/python2.5/matplotlib/axes.py in bar(self, left, height,
width, bottom, color, edgecolor, linewidth, yerr, xerr, ecolor, capsize, align,
orientation, log, **kwargs)
4230 # FIXME: convert the following to proper input validation
4231 # raising ValueError; don't use assert for this.
-> 4232 assert len(left)==nbars, "incompatible sizes: argument 'left'
must be length %d or scalar" % nbars
4233 assert len(height)==nbars, ("incompatible sizes: argument
'height' must be length %d or scalar" %
4234 nbars)
AssertionError: incompatible sizes: argument 'left' must be length 1 or scalar
using scalars doesn't help:
ax.bar(1,5,orientation='horizontal')
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Am I doing something wrong??
--
Ernest
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users