Re: [Matplotlib-users] ticks & labels

2008-08-11 Thread Jeffrey Fogel
Thanks John, that worked perfectly (with JJ's correction). I'm fairly new to python and hadn't considered writing a separate class for it. -Jeffrey On Mon, Aug 11, 2008 at 3:53 PM, Jae-Joon Lee <[EMAIL PROTECTED]> wrote: > A minor comment. > John's code may give incorrect results when exponents

Re: [Matplotlib-users] ticks & labels

2008-08-11 Thread Jae-Joon Lee
A minor comment. John's code may give incorrect results when exponents are negative. int() truncates a floating point argument towards zero, e.g., int(-1.5) == -1 not -2. I guess calling floor() before int() will work. fx = int(np.floor(np.log(abs(val))/np.log(self._base) +0.5)) -JJ On

Re: [Matplotlib-users] ticks & labels

2008-08-11 Thread John Hunter
On Mon, Aug 11, 2008 at 1:45 PM, Jeffrey Fogel <[EMAIL PROTECTED]> wrote: > The two things I have been unable to figure out are how to add a major > tick at all of the other magnitudes (those without a label) and how to > change the format of the labels so that only the exponent is showing. > I'm

[Matplotlib-users] ticks & labels

2008-08-11 Thread Jeffrey Fogel
I am having some trouble getting the ticks and labels on my plot to match what I want and I was hoping that someone here would be able to help. Here are what I want (on the yaxis): logarithmic ticks with major ticks every order of magnitude but labels ONLY every other magnitude. Additionally, I