Re: [Matplotlib-users] scientific notation in ticklabels for linear plot

2010-10-19 Thread Jonathan Slavin
Friedrich, Our e-mails crossed. I don't think the numbers need to have the same exponent. I would go with (d) as my example does. The more difficult part to my mind is the number of significant digits to use. The current code that determines whether to use an offset or not must look at the num

Re: [Matplotlib-users] scientific notation in ticklabels for linear plot

2010-10-19 Thread Friedrich Romstedt
2010/10/19 Jonathan Slavin : > I think that'd be fine -- i.e. the option of \cdot or \times (though in > the gmane preview the dot looks a bit low).  In the mean time, I came up > with the method below that worked for my purpose. Okay thx > import matplotlib.pyplot as plt > import numpy as np > f

Re: [Matplotlib-users] scientific notation in ticklabels for linear plot

2010-10-19 Thread Jonathan Slavin
I think that'd be fine -- i.e. the option of \cdot or \times (though in the gmane preview the dot looks a bit low). In the mean time, I came up with the method below that worked for my purpose. Jon import matplotlib.pyplot as plt import numpy as np from matplotlib.ticker import FuncFormatter d

Re: [Matplotlib-users] scientific notation in ticklabels for linear plot

2010-10-19 Thread Friedrich Romstedt
2010/10/19 David Pine : > I like the times symbol but others prefer the dot (which I missed in the > gmane preview!).  So I like your suggestion of providing an option to use > either \cdot or \times. Okay, I'll try to look into it next week, is that okay with you both? I don't want to do it now

Re: [Matplotlib-users] scientific notation in ticklabels for linear plot

2010-10-19 Thread David Pine
I like the times symbol but others prefer the dot (which I missed in the gmane preview!). So I like your suggestion of providing an option to use either \cdot or \times. David On Oct 19, 2010, at 3:23 PM, Friedrich Romstedt wrote: > What about inserting \cdot, that's the scientific notation I

Re: [Matplotlib-users] scientific notation in ticklabels for linear plot

2010-10-19 Thread Friedrich Romstedt
What about inserting \cdot, that's the scientific notation I do prefer? If I'm not mistaken that's what I did that time, might be unreadable in the preview? I checked, when you look close you see the dot in gmane preview. We can make this customisable, with \times as an alternative option. Frie

Re: [Matplotlib-users] scientific notation in ticklabels for linear plot

2010-10-19 Thread David Pine
I agree with Jonathan and would very much like to see this feature implemented. The example shown in the thread didn't show the "×" symbol, however, which would be nice to have -- e.g. it should read 2.0 × 10² rather than 2.0 10². David On Oct 19, 2010, at 1:08 PM, Friedrich Romstedt wrote:

Re: [Matplotlib-users] scientific notation in ticklabels for linear plot

2010-10-19 Thread Friedrich Romstedt
2010/10/18 Jonathan Slavin : > I'm wondering if there's some relatively automatic way to have the > ticklabels to come out in scientific notation for an axis that uses a > linear scale (and has a range that warrants scientific notation)?  For > example, an axis that goes from 0 to 2.E18 by default

[Matplotlib-users] scientific notation in ticklabels for linear plot

2010-10-18 Thread Jonathan Slavin
Hi, I'm wondering if there's some relatively automatic way to have the ticklabels to come out in scientific notation for an axis that uses a linear scale (and has a range that warrants scientific notation)? For example, an axis that goes from 0 to 2.E18 by default uses the labels 0, 0.5, 1.0, 1.5