Re: [Matplotlib-users] Format y-axis tick labels in 'comma' notation ie 234004 would be 234, 004 etc.

2010-10-19 Thread Dharhas Pothina
> There's no way around the ``Decimal``? Otherwise I cannot confirm the > inelegancyness except this construct ;-) the moneyfmt routine I downloaded requires the Decimal package (i.e decimal.Decimal). I didn't have time to try writing my own version. It has a bug that if you specify number of

Re: [Matplotlib-users] Format y-axis tick labels in 'comma' notation ie 234004 would be 234, 004 etc.

2010-10-19 Thread Dharhas Pothina
> Just got Goekhan's message, try a combination of both, might be worth. a little inelegant but I got it working by combining both ideas: def thousands(x, pos): 'The two args are the value and tick position' xnew = moneyfmt(Decimal(x.__str__())) return xnew where moneyfmt is the func

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] Format y-axis tick labels in 'comma' notation ie 234004 would be 234, 004 etc.

2010-10-19 Thread Friedrich Romstedt
2010/10/19 Dharhas Pothina : > I'm assuming this is possible and common but I'm not finding the correct > combination of search terms to find any examples on the mailing list or > online on how to do this. > > I'd like to display the y-axis tick labels in the 'comma' notation i.e. > > 234004 = 23

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] Format y-axis tick labels in 'comma' notation ie 234004 would be 234, 004 etc.

2010-10-19 Thread Gökhan Sever
On Tue, Oct 19, 2010 at 1:31 PM, Dharhas Pothina wrote: > Hi All, > > I'm assuming this is possible and common but I'm not finding the correct > combination of search terms to find any examples on the mailing list or > online on how to do this. > > I'd like to display the y-axis tick labels in t

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

[Matplotlib-users] Format y-axis tick labels in 'comma' notation ie 234004 would be 234, 004 etc.

2010-10-19 Thread Dharhas Pothina
Hi All, I'm assuming this is possible and common but I'm not finding the correct combination of search terms to find any examples on the mailing list or online on how to do this. I'd like to display the y-axis tick labels in the 'comma' notation i.e. 234004 = 234,004 1237689 = 1,237,689 etc t

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] Help in graph

2010-10-19 Thread Paul Hobson
Use the legend method of your axes object: http://matplotlib.sourceforge.net/examples/api/legend_demo.html?highlight=codex%20legend On Tue, Oct 19, 2010 at 11:15 AM, Waléria Antunes David wrote: > Hi, > > This example helped me. I have another question. How do I insert the label > as in the examp

Re: [Matplotlib-users] Help in graph

2010-10-19 Thread Waléria Antunes David
Hi, This example helped me. I have another question. How do I insert the label as in the example image?: Data from Riess et al (2004) Thanks, Waleria. On Tue, Oct 19, 2010 at 3:50 PM, Paul Hobson wrote: > Waléria, > > Hopefully this example helps: > > # code... > import matplotlib.pyplot as pl

Re: [Matplotlib-users] Xtick label size in ImageGrid

2010-10-19 Thread Justin McCann
On Fri, Oct 8, 2010 at 11:10 PM, Jae-Joon Lee wrote: > The label_mode need to be capital "L", instead of "l". I guess this > will fix your first problem. > While we make "l" same as "L", but I think it actually degrade the > readability of the code, and I;m inclined to leave it as is. Let me > kno

Re: [Matplotlib-users] Help in graph

2010-10-19 Thread Friedrich Romstedt
2010/10/19 Waléria Antunes David : > Example: In my graph, the x-axis this way: 0.0 - 0.2 -- 0.4 - > 0.6 --- 0.8 --- 1.0 --- 1.2 1.4 > I need this way: 0 - 0.5 -- 1.0 - 1.5 2 you might use mpl.ticker.MaxNLocator(4). Install it in the Axes usin

[Matplotlib-users] [regression tests] failures in path simplication unit tests?

2010-10-19 Thread Friedrich Romstedt
Hi, please, can someone dealing with the path simplication have a look at the log attached? I'm on 10.6 Mac OS X with astraw repo 10/18/2010. The symlog mismatch is said to by fixed; for the pcolormesh mismatch I cannot see any visual difference. Might by false alarm. But the ``len(simplified)

Re: [Matplotlib-users] sub-sub-plots, sub-sub-sub-plots, etc.

2010-10-19 Thread Friedrich Romstedt
2010/10/19 Kynn Jones : > I need to generate a fairly complex chart, for which I need the ability to > specify not only subplots, but also sub-subplots.  (Our group has found such > charts useful in the past, but they were generated using horrific MATLAB > code, which we're trying to get away from

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

Re: [Matplotlib-users] Log scaling error on rev8753

2010-10-19 Thread Gökhan Sever
OK, I have just done an "svn up" and seen that this is fixed in http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?revision=8756&view=revision Thanks for the fix. On Tue, Oct 19, 2010 at 10:06 AM, Gökhan Sever wrote: > Sorry I have forgotten to add that you should issue a "k" key on the >

Re: [Matplotlib-users] Log scaling error on rev8753

2010-10-19 Thread Gökhan Sever
Sorry I have forgotten to add that you should issue a "k" key on the plot to scale the x-axis logarithmically. On Tue, Oct 19, 2010 at 7:42 AM, Michael Droettboom wrote: > I can't reproduce this here with trunk, though I get a different crash > in the 1.x branch (which has an easy fix).  Are ther

Re: [Matplotlib-users] tests.test_axes.test_symlog failed

2010-10-19 Thread Michael Droettboom
On 10/18/2010 05:17 PM, LittleBigBrain wrote: > I ran the matplotlib.test() and got: > FAILED (KNOWNFAIL=90, errors=14) > > I checked more carefully now. It turns out, all the differences are texts. > > Most of them are very small differences: Some of them offset to right > and down a little bit. S

[Matplotlib-users] sub-sub-plots, sub-sub-sub-plots, etc.

2010-10-19 Thread Kynn Jones
I need to generate a fairly complex chart, for which I need the ability to specify not only subplots, but also sub-subplots. (Our group has found such charts useful in the past, but they were generated using horrific MATLAB code, which we're trying to get away from as quickly as we can, not only b

Re: [Matplotlib-users] Log scaling error on rev8753

2010-10-19 Thread Michael Droettboom
I can't reproduce this here with trunk, though I get a different crash in the 1.x branch (which has an easy fix). Are there any additional steps required to reproduce? Mike On 10/18/2010 09:50 PM, Gökhan Sever wrote: > Hello, > > I can't log scale my axes on rev8753. It was working on a previo

[Matplotlib-users] 'Spine' object has no attribute 'set_smart_bounds'

2010-10-19 Thread Ted Kord
Hi I've just tried some of the source code from the Spine demos but I when I try : ax.spines['bottom'].set_smart_bounds(True) I get the error: 'Spine' object has no attribute 'set_smart_bounds' What could be the problem? Ted ---

Re: [Matplotlib-users] Ticks Size

2010-10-19 Thread Ted Kord
Thanks all. That fixed the problem. Ted On 19 October 2010 00:02, Gökhan Sever wrote: > On Mon, Oct 18, 2010 at 5:36 PM, Eric Firing wrote: > > > > setp(xticks, markeredgewidth=4) > > > > Ticks are markers. > > > > Eric > > Good catch. Thanks for the fix. > > -- > Gökhan > > > ---