ylabel formatting


I'm plotting y values which exceed 10000. I would like the y axis
labels to be formatted as whole numbers such as 10000, not in scientific
notation such as 1.0e4, with the exponent appearing up at the top left corner.
This occurs if I plot something like:

from pylab import *
y = (1000,9000,14000)

I've looked around the docs and source a bit, but haven't found the love
yet. I'm running version 0.86.2. Any help would be appreciated. Thanks!

Joseph Sheedy
Technical Specialist, 3TIER Environmental Forecast Group
josephs@...1105... | (206)325-1573 x116


I think I have a Mac OS X specific problem using 'ipython -pylab'

I have some pylab plotting that updates for every event on ubuntu with the wxpython backend.
However, the same code on OS X does not update until the final pylab.show().

However, when I enter a series of plot commands from the ipython prompt, they update fine.
I'm presuming it's some kind of threading problem, so my question is; is there a way to explicitly give app.mainloop() or whatever some oxygen?

Here's the example code which updates each plot separately as expected/desired under ubuntu +python2.4 + wxPython2.6 + ipython 0.6.x, matplotlib-0.86.2

Under Mac OS 10.4 + python 2.4.1 + wxpython2.6 + ipython 0.7.1.fix1 (didn't work for ipython 0.6.x either) + matplotlib-0.86.2cvs-py2.4-macosx-10.4-ppc.egg, the update does not occur until the pylab.show() statement is reached (and yes, I tried replacing the draw with show, no difference).
It was a lot faster when I removed the pylab.draw() statement, so the rendering would seem to be taking place, it just doesn't make it to the physical screen.

Have any other Mac OS X users experienced this? Any suggestions?



% ipython -pylab
In [1]:import interactive as i
In [2]:i.main()
isinteractive() = True

here is interactive.py

#!/usr/bin/env python


# ipython -pylab
# In [1]: import interactive as i
# In [2]: i.main()

import pylab, numpy

class data :
   def __init__(self, N) :
     self.n = 0
     self.N = N
     self.t = numpy.arange(0.0, 2*numpy.pi, numpy.pi / 64)
   def read(self) :
     self.n += 1
     self.y = numpy.sin(self.t) + numpy.randn(len(self.t))/10.0
     if self.n >= self.N : return False
     else : return True

def main(N = 100) :
   print 'isinteractive() = ', pylab.interactive()
   d = data(N)
   f = pylab.figure()
   a = f.add_subplot(1,1,1)

   cols = 'rgbcmyk'
   n = 0
   while d.read() :
# a.hold(False)
     a.plot(d.t, d.y, cols[n % len(cols)])
     n += 1

if __name__ == '__main__' :