Problem with logarithmic axes using AXIS IDL command [message #84723] |
Tue, 02 April 2013 19:03 |
hibou21
Messages: 2 Registered: April 2013
|
Junior Member |
|
|
I am having a strange IDL problem involving logarithmic axes. I am trying to add a logarithmic axis on the right hand side of a plot using the AXIS command. The function that relates the values on the left-hand-side to those on the right-hand-side is:
(90.0/3.85)*(10.0d^(!Y.CRANGE/2.50d) - (90.0/3.85)
(The value 90.0/3.85 ~= 23.4)
When I try to plot (90.0/3.85)*(10.0d^(!Y.CRANGE/2.50d), without subtracting the final number, IDL does what it's supposed to do.
However, when I try to plot my full expression:
(90.0/3.85)*(10.0d^(!Y.CRANGE/2.50d) - (90.0/3.85)
IDL gives the error:
% AXIS: Warning: Infinite plot range.
I played around with it a bit and it turns out you can subtract up to about 14.8 alright, but once you try subtracting more than that, it stops working and gives the error.
Here is a sample plot that you can use to reproduce the error:
IDL> plot, [1,2,3], [1,2,3], yr=[-0.5,4.5],ysty=9
IDL> AXIS, YAXIS = 1, /ylog, YRANGE = (90.0/3.85)*(10.0d^(!Y.CRANGE/2.50d))-15, /ysty, /save
I've tried resetting !Y.Type to both 0 and 1, as suggested online, but to no effect. I've also tried inputting the YRANGE values manually [-8.6269713,1451.5886], but it doesn't make a difference. I'm really stumped by this...
My IDL information: IDL Version 7.0, Mac OS X (darwin i386 m32). (c) 2007, ITT Visual Information Solutions
|
|
|