Re: [Matplotlib-users] empty xticklabel before plotting ...

2010-09-23 Thread Oz Nahum
Hi Ryan, Thanks again, Well your solution is also working. I get very similar results with class NiceSciFormatter(Formatter): def __call__(self, x, pos=None): a="%1.1E" % x a=a[:5]+a[-1] return a It seems though that your solution enables more fine tuning ! Cheers,

Re: [Matplotlib-users] empty xticklabel before plotting ...

2010-09-23 Thread Ryan May
On Thu, Sep 23, 2010 at 8:52 AM, Oz Nahum wrote: > Hi Ryan, > > Thanks for your answer. However, I don't understand from the existing > documentation how to use tickers. > > In the past I used the following method: > class SciFormatter(Formatter): >     def __call__(self, x, pos=None): >     r

Re: [Matplotlib-users] empty xticklabel before plotting ...

2010-09-23 Thread Oz Nahum
Hi Every, Hi Ryan I finally solved this issue, which bothered me very long. I managed to make a nicer scientific formatting on the xticks ! from pylab import * import numpy as N from matplotlib.ticker import Formatter,FuncFormatter import os #class to produce scientific format numbering class

Re: [Matplotlib-users] empty xticklabel before plotting ...

2010-09-23 Thread Oz Nahum
Hi Ryan, Thanks for your answer. However, I don't understand from the existing documentation how to use tickers. In the past I used the following method: class SciFormatter(Formatter): def __call__(self, x, pos=None): return "%1.1e" % x axs.yaxis.set_major_formatter(SciFormatter())

Re: [Matplotlib-users] empty xticklabel before plotting ...

2010-09-23 Thread Ryan May
On Thu, Sep 23, 2010 at 3:49 AM, Oz Nahum wrote: > Hi Everyone, > > I don't like the default scientific formatting in matplotlib, IMHO the > format of having a zero after the exponent is a waste of space in my opinion > ... > What I mean is that mpl is writing zero as: > 0.0e+00 or 1.2e-03. IMHO i

[Matplotlib-users] empty xticklabel before plotting ...

2010-09-23 Thread Oz Nahum
Hi Everyone, I don't like the default scientific formatting in matplotlib, IMHO the format of having a zero after the exponent is a waste of space in my opinion ... What I mean is that mpl is writing zero as: 0.0e+00 or 1.2e-03. IMHO it would suffice just to do 0.0 and 1.2e-3, which take less spac