Re: Odd axis labelling error [message #67823] |
Thu, 27 August 2009 07:02 |
Jean H.
Messages: 472 Registered: July 2006
|
Senior Member |
|
|
Jimmy wrote:
> Hi,
>
> I'm trying to create a plot with a log y-axis from 10e-4 to 10e3. I'm
> using the follow:
>
> plot_io, variable1, variable2, xr = [1,8], yr =[10e-4,10e3], xstyle =
> 1, ystyle = 1
>
> (with titles and background colour stuff too).
>
> This plots the x axis fine, BUT- the y-axis is plotted from 10e-3 to
> 10e4. Anyone know why this might be, and how I can fix it?
>
> Thanks!
Hi,
could it be that you are confusing 10e3 and 10^3 ?
A simple test using the same range as you do labels as 10^-3 to 10^4,
which is the same as 10e-4 and 10e3.
In IDL, aEb = a (float) * 10^b
Jean
|
|
|
Re: Odd axis labelling error [message #67827 is a reply to message #67823] |
Thu, 27 August 2009 06:18  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Jimmy writes:
> I'm trying to create a plot with a log y-axis from 10e-4 to 10e3. I'm
> using the follow:
>
> plot_io, variable1, variable2, xr = [1,8], yr =[10e-4,10e3], xstyle =
> 1, ystyle = 1
>
> (with titles and background colour stuff too).
>
> This plots the x axis fine, BUT- the y-axis is plotted from 10e-3 to
> 10e4. Anyone know why this might be, and how I can fix it?
I think this is the ol' Sky is Falling thing in another guise:
http://www.dfanning.com/math_tips/sky_is_falling.html
This works:
plot_io, v1, v2, x =[1,8], yr=[10d-4,10d3], xstyle=1, ystyle=1
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: Odd axis labelling error [message #67828 is a reply to message #67827] |
Thu, 27 August 2009 05:54  |
Heinz Stege
Messages: 189 Registered: January 2003
|
Senior Member |
|
|
On Thu, 27 Aug 2009 05:16:05 -0700 (PDT), Jimmy wrote:
> Hi,
>
> I'm trying to create a plot with a log y-axis from 10e-4 to 10e3. I'm
> using the follow:
>
> plot_io, variable1, variable2, xr = [1,8], yr =[10e-4,10e3], xstyle =
> 1, ystyle = 1
>
> (with titles and background colour stuff too).
>
> This plots the x axis fine, BUT- the y-axis is plotted from 10e-3 to
> 10e4. Anyone know why this might be, and how I can fix it?
>
> Thanks!
Good joke!
10e-4 = 10*1e-4 = 1e-3 = 10^(-3)
That is, what I see on the plot.
Heinz
|
|
|