Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-06-06 Thread Xavier Gnata
Eric Firing wrote: > Xavier Gnata wrote: >> ok. My bad! Sorry. I have changed the default to %1.4g so that is matches my usecases *but* I agree that correct way to improve it in not that trivial... >>> >>> >>> You can control the point at which mpl falls over to scien

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-06-06 Thread Eric Firing
Xavier Gnata wrote: > >>> ok. My bad! Sorry. >>> I have changed the default to %1.4g so that is matches my usecases >>> *but* I >>> agree that correct way to improve it in not that trivial... >>> >> >> >> You can control the point at which mpl falls over to scientific >> notation. From the

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-06-06 Thread Xavier Gnata
>> ok. My bad! Sorry. >> I have changed the default to %1.4g so that is matches my usecases *but* I >> agree that correct way to improve it in not that trivial... >> > > > You can control the point at which mpl falls over to scientific > notation. From the matplotlibrc file (see > http://mat

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-06-01 Thread Xavier Gnata
John Hunter wrote: > On Sat, May 30, 2009 at 6:46 PM, Eric Firing wrote: > > >> Possible, but I think there is a much better solution along the lines I >> suggested earlier. I have it partly implemented. To really do it right >> will require a little bit of work on all the interactive backend

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-05-30 Thread John Hunter
On Sat, May 30, 2009 at 6:46 PM, Eric Firing wrote: > Possible, but I think there is a much better solution along the lines I > suggested earlier.  I have it partly implemented.  To really do it right > will require a little bit of work on all the interactive backends; it might > be very little a

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-05-30 Thread Eric Firing
John Hunter wrote: > On Sat, May 30, 2009 at 11:52 AM, Eric Firing wrote: > >> No, that applies to the axis ticks but not to the readout, and I think it is >> the latter that Xavier is concerned with--at least that is what I have been >> talking about, and want to improve. > > Just to clarify --

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-05-30 Thread Xavier Gnata
John Hunter wrote: > On Sat, May 30, 2009 at 11:52 AM, Eric Firing wrote: > > >> No, that applies to the axis ticks but not to the readout, and I think it is >> the latter that Xavier is concerned with--at least that is what I have been >> talking about, and want to improve. >> > > Just to

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-05-30 Thread John Hunter
On Sat, May 30, 2009 at 11:52 AM, Eric Firing wrote: > No, that applies to the axis ticks but not to the readout, and I think it is > the latter that Xavier is concerned with--at least that is what I have been > talking about, and want to improve. Just to clarify -- by "readout" do you mean the

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-05-30 Thread Eric Firing
John Hunter wrote: > On Sat, May 30, 2009 at 2:49 AM, Xavier Gnata wrote: > >> ok. My bad! Sorry. >> I have changed the default to %1.4g so that is matches my usecases *but* I >> agree that correct way to improve it in not that trivial... > > > You can control the point at which mpl falls over

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-05-30 Thread John Hunter
On Sat, May 30, 2009 at 2:49 AM, Xavier Gnata wrote: > ok. My bad! Sorry. > I have changed the default to %1.4g so that is matches my usecases *but* I > agree that correct way to improve it in not that trivial... You can control the point at which mpl falls over to scientific notation. From th

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-05-30 Thread Xavier Gnata
Eric Firing wrote: > Xavier Gnata wrote: >> >>> > >>> Right now, the default is very simple: >>> >>> def format_data_short(self,value): >>> 'return a short formatted string representation of a number' >>> return '%1.3g'%value >>> >>> It looks like changing it to something l

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-05-29 Thread Eric Firing
Xavier Gnata wrote: > >> >>> >> Right now, the default is very simple: >> >> def format_data_short(self,value): >> 'return a short formatted string representation of a number' >> return '%1.3g'%value >> >> It looks like changing it to something like "%-12g" would facilitate >

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-05-29 Thread Xavier Gnata
> >> >> However, everyone would be happy if the default format would be >> consistent : >> >> As it is, *by default*, when <1000 it displays an int and after 1000 >> it displays 1.42e3. >> Why? What do you think this scientific format is a good for? >> >> I understand some users would like to se

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-05-29 Thread Eric Firing
Xavier Gnata wrote: > > However, everyone would be happy if the default format would be consistent : > > As it is, *by default*, when <1000 it displays an int and after 1000 it > displays 1.42e3. > Why? What do you think this scientific format is a good for? > > I understand some users would l

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-05-29 Thread Xavier Gnata
John Hunter wrote: > On Fri, May 29, 2009 at 10:50 AM, Xavier Gnata wrote: > > >>> I had the same problem and fixed it by changing just two lines of code in >>> the axes.py (line 1812 and 1814). Just change the formatter in >>> 'self.xaxis.major.formatter.set_scientific(sb)' to whatever you w

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-05-29 Thread John Hunter
On Fri, May 29, 2009 at 10:50 AM, Xavier Gnata wrote: >> I had the same problem and fixed it by changing just two lines of code in >> the axes.py (line 1812 and 1814). Just change the formatter in >> 'self.xaxis.major.formatter.set_scientific(sb)' to whatever you want (the >> same for y). You

Re: [Matplotlib-users] x= / y= labels default format is wrong

2009-05-29 Thread Xavier Gnata
Indeed, but it should really be fixed in the svn. Xavier > Hi Xavier, > > I had the same problem and fixed it by changing just two lines of code in the > axes.py (line 1812 and 1814). Just change the formatter in > 'self.xaxis.major.formatter.set_scientific(sb)' to whatever you want (the > sam