IDL log scale issues [message #85969] |
Sun, 22 September 2013 11:51  |
Phys_Gurl
Messages: 2 Registered: September 2013
|
Junior Member |
|
|
Hello All,
Quick issue:
When plotting with \xlog, \ylog why does IDL not listen to my xrange and yrange commands?
It seems to want to use the x and y range of its choice...
|
|
|
|
Re: IDL log scale issues [message #85972 is a reply to message #85970] |
Sun, 22 September 2013 12:43   |
Phys_Gurl
Messages: 2 Registered: September 2013
|
Junior Member |
|
|
On Sunday, September 22, 2013 3:08:02 PM UTC-4, David Fanning wrote:
> Phys_Gurl writes:
>
>
>
>> When plotting with \xlog, \ylog why does IDL not listen to my xrange and yrange commands?
>
>> It seems to want to use the x and y range of its choice...
>
>
>
> IDL *always* autoscales axes. You tell IDL to use exact axis scaling
>
> with [XYZ]Style keywords (e.g, XStyle=1).
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Now I am receiving
% PLOT: Warning: Infinite plot range.
Here is my code:
x and y are both arrays.
plot, x, y, psym = 7, /xlog, /ylog, XStyle = 1, YStyle = 1, xrange=[0,16], yrange = [10,10000], Title = 'Run 1: Counts versus Time', XTitle = 'Time (minutes)', YTitle = 'Counts'
Thanks!
|
|
|
Re: IDL log scale issues [message #85973 is a reply to message #85972] |
Sun, 22 September 2013 13:24  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
foord14@bu.edu writes:
> Now I am receiving
> % PLOT: Warning: Infinite plot range.
>
> Here is my code:
>
> x and y are both arrays.
>
> plot, x, y, psym = 7, /xlog, /ylog, XStyle = 1, YStyle = 1, xrange=[0,16], yrange = [10,10000], Title = 'Run 1: Counts versus Time', XTitle = 'Time (minutes)', YTitle = 'Counts'
Yes, the log of zero is infinity. It's a math thing. ;-)
Try going from 1 to 16 or 1e-6 to 16, something like that.
You are probably not going to care much for the labeling of log axes.
Here is some reading you can do that might help.
http://www.idlcoyote.com/graphics_tips/minorlog.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|