from numpy import *<br><br>was the only line missing, called before the rest.<br>It seems to work fine if I use <br>     from pylab import *<br>instead of <br>     import pylab as g<br><br>And actually if I do both in this order:
<br>     import pylab as g<br>
     from pylab import *<br>
<br>then plot() and g.plot() both do the right thing (no truncating of floats).  Seems as if there's some initialization code that only gets run with the 'from pylab import *' version.<br><br>--bb<br><br><div><span class="gmail_quote">
On 2/14/06, <b class="gmail_sendername">John Hunter</b> <<a href="mailto:jdhunter@ace.bsd.uchicago.edu">jdhunter@ace.bsd.uchicago.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
>>>>> "Bill" == Bill Baxter <<a href="mailto:wbaxter@gmail.com">wbaxter@gmail.com</a>> writes:<br><br>    Bill> Anyone know if matplotlib is supposed to work with the new<br>    Bill> NumPy or if there is work afoot to make it work?  It seems
<br>    Bill> to truncate all numpy.array and numpy.matrix inputs to<br>    Bill> integer values:<br><br>You're script as posted is incomplete<br><br>    import matplotlib<br>    matplotlib.interactive(True)<br>    
matplotlib.use('WXAgg')<br>    import matplotlib.pylab as g<br><br>    g.plot(rand(5),rand(5),'bo')<br><br>where for example is rand coming from?  My guess is you have an import<br>statement you are not showing us.<br><br>
If you are using a recent numpy and matplotlib, and set numerix to<br>numpy in your matplotlib rc file (~/.matplotlib/matplotlibrc)<br>everything should work if you get your array symbols from pylab, numpy<br>or matplotlib.numerix
 (all of which will get their symbols from<br>numpy....)<br><br>JDH<br></blockquote></div><br><br>