Hi folks,
Sorry to bombard the mailing list with questions, I'm starting to use
sage for more and more things lately.  I'm trying to get a figure
together for a paper and thought I'd try using the bar() command in
pylab. However, the following code (modeled after an example in
matplotlib) gives an error.  I thought maybe a problem with number
coercion was causing the issue, but explicitly casting the numbers as
floats has no effect. I should mention that I'm completely new to
matplotlib, so it could be that I'm just not supplying arguments
correctly.

import pylab as p
p.close()
pos=p.arange(4.0,dtype=float)
width=0.35
dat=p.array([-2.0,10.4,30.0,29.9],dtype=float)
p.bar(pos,dat,width,color='b')
p.savefig('sage.png')

This returns :
  File "/home/thomas/.sage/sage_notebook/worksheets/admin/10/code/
2.py", line 11, in <module>
    p.bar(pos,dat,width,color='b')
  File "/home/thomas/sage/local/lib/python2.5/site-packages/matplotlib/
pyplot.py", line 1402, in bar
    ret =  gca().bar(*args, **kwargs)
  File "/home/thomas/sage/local/lib/python2.5/site-packages/matplotlib/
axes.py", line 3293, in bar
    self.add_patch(r)
  File "/home/thomas/sage/local/lib/python2.5/site-packages/matplotlib/
axes.py", line 1145, in add_patch
    self._update_patch_limits(p)
  File "/home/thomas/sage/local/lib/python2.5/site-packages/matplotlib/
axes.py", line 1153, in _update_patch_limits
    self.update_datalim(xys)
  File "/home/thomas/sage/local/lib/python2.5/site-packages/matplotlib/
axes.py", line 1180, in update_datalim
    self.dataLim.update_numerix_xy(xys, -1)
TypeError: Bbox::update_numerix_xy expected numerix array

If anyone has some insight into this, I'd greatly appreciate it.
Thomas
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to