The following code should produce two identical histograms overlapping.
x = scipy.random.normal(0,1,100)
f = figure(num=1)
f.clear()
ax = f.add_subplot(111)
ns,bns,plt0 = ax.hist(x,bins=10,log=True)
plt1 = ax.bar(bns[0:-1],ns,width=bns[1:]-bns[0:-1],color='r',log=True)
draw()
However, it fails on the line starting with "plt1 = ax.bar" with the following error:
...
File "/Users/xof/Documents/Dev/environments/tuneup/lib/python2.6/site-packages/matplotlib/transforms.py", line 786, in from_bounds
return Bbox.from_extents(x0, y0, x0 + width, y0 + height)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'
This appears to be an issue with both Enthought's Canopy and the Macport of matplotlib after looking online. As no one else is reporting this bug on the matplotlib mailing lists I think it comes from the configuration used by Macports and Enthought.