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

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 matplotlibrc file (see

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 scientific notation. From the

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 efir...@hawaii.edu 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

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 like %-12g would facilitate

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 xavier.gn...@gmail.com 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

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 xavier.gn...@gmail.com 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

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 efir...@hawaii.edu 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

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 efir...@hawaii.edu 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.

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 efir...@hawaii.edu 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 6:46 PM, Eric Firing efir...@hawaii.edu 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

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

2009-05-29 Thread Xavier Gnata
for y). But it would really be great to see your proposal as a standard. Greetings, David Original-Nachricht Datum: Sun, 24 May 2009 19:15:18 +0200 Von: Xavier Gnata xavier.gn...@gmail.com An: matplotlib-users@lists.sourceforge.net Betreff: [Matplotlib-users] x= / y

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 xavier.gn...@gmail.com 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

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 xavier.gn...@gmail.com 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

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 like to

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 see floats by

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 considerable

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

2009-05-24 Thread Xavier Gnata
Hello all, I routinely work with images sizes [1000,1000]. There is a slight annoying problem whatever the backend I use: Pixels coordinates default format is wrong. It does not make sense to display x=1.42e+03,y=1.92e+03. Pixels coordinates should be formated *by default* as integers. Would