comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Why isn't this working ? axis problem (probably very simple)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Why isn't this working ? axis problem (probably very simple) [message #28097] Tue, 20 November 2001 08:00
Henk is currently offline  Henk
Messages: 7
Registered: September 2000
Junior Member
Thanks a lot for your ultra-fast answer !
It works !

Henk

David Fanning wrote:

> David Fanning (david@dfanning.com) writes:
>
>
>> What you have to do is "unstick" the log axis before
>> you make your AXIS call. You need something like this:
>>
>> plot, o_arr,10^(alt_arr),ylog,,ystyle=9,ytitle='Pressure'
>> !Y.Type=0
>> axis,yaxis=1, ystyle=1,ytitle = 'Altitude',color=1,yrange=[0,40]
>>
>
> Oh, be sure to add a SAVE to the AXIS command,
> so you can draw something on it! :-)
>
> Cheers,
>
> David
>
>
Re: Why isn't this working ? axis problem (probably very simple) [message #28098 is a reply to message #28097] Tue, 20 November 2001 07:42 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning (david@dfanning.com) writes:

> What you have to do is "unstick" the log axis before
> you make your AXIS call. You need something like this:
>
> plot, o_arr,10^(alt_arr),ylog,,ystyle=9,ytitle='Pressure'
> !Y.Type=0
> axis,yaxis=1, ystyle=1,ytitle = 'Altitude',color=1,yrange=[0,40]

Oh, be sure to add a SAVE to the AXIS command,
so you can draw something on it! :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Why isn't this working ? axis problem (probably very simple) [message #28099 is a reply to message #28098] Tue, 20 November 2001 07:37 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Henk (henk@mailandnews.com) writes:

> I want to plot data on a graph with as left y-axis the pressure
> (logarithmic) and to the right the altitude (not log).
> I'm trying to do this this way :
>
> plot, o_arr,10^(alt_arr),
> xrange=[xmin,xmax],yrange=[1013,1],/ylog,color=1,ystyle=9,yt itle='Pressure'
>
> and
>
> axis,yaxis=1, ystyle=1,ytitle = 'Altitude',color=1,yrange=[0,40]
>
> but it gives a warning about an infinite range !
> Why is this ? I don't understand. It must have something to do with
> the log plot, I guess, but even with a 'ylog=0' as parameter to 'axis'
> it won't work.
>
> Could someone help me out ?

This is a really common problem. I should write an
article about it. :-)

The problem is that log axes are "sticky", unlike
almost everything else in IDL. Once you do something
with logs, IDL appears to remember it forever. (Probably
holding it against you, for all I know.)

What you have to do is "unstick" the log axis before
you make your AXIS call. You need something like this:

plot, o_arr,10^(alt_arr),ylog,,ystyle=9,ytitle='Pressure'
!Y.Type=0
axis,yaxis=1, ystyle=1,ytitle = 'Altitude',color=1,yrange=[0,40]

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Why isn't this working ? axis problem (probably very simple)
Next Topic: Re: Poor letters!

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:39:23 PDT 2025

Total time taken to generate the page: 0.00759 seconds