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

Home » Public Forums » archive » Re: PLOT keywords vs System Variables
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: PLOT keywords vs System Variables [message #978] Mon, 19 April 1993 05:45
zawodny is currently offline  zawodny
Messages: 121
Registered: August 1992
Senior Member
In article <1qmd1hINNc6o@golem.wcc.govt.nz> hadfield_m@kosmos.wcc.govt.nz writes:
>
> Consider the following
>
> plot,indgen(10)
>
> As you'd expect, a graph of a straight line appears on the graphics output
> device. But this:
>
> plot,indgen(10),position=!P.position
>
> gives a blank screen and the message:
>
> % PLOT: Data coordinate system not established.
> % Execution halted at $MAIN$ (PLOT).
>
> Just to make sure there's nothing strange about the setting of !P.position
> system variable we type:
>
> help,!P.position & print,!P.position
> <Expression> FLOAT = Array(4)
> 0.000000 0.000000 0.000000 0.000000
>

But this is strange! You have asked PLOT to draw a plot with dimensions of
zero. PLOT has to do some division by zero to set up the coordinate system. My
understanding is that if plot goes off and finds a !p(x or y).aaaa system
variable and finds it filled with zeros or null stings then it will use some
default value. When you specify a keyword though, IDL says "Hey, this guy must
know what he is doing" and uses it directly (no checking whether to use
defaults).

I do agree though that the behavior you would like to see should be the way
that it works. It would make a lot of programs easier to write. But for now
that is the way it is.


--
Joseph M. Zawodny (KO4LW) NASA Langley Research Center
Internet: zawodny@arbd0.larc.nasa.gov MS-475, Hampton VA, 23681-0001
Packet: ko4lw@wb0tax.va.usa
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Making help for your own functions & procedures
Next Topic: Re: Application programming--missing features

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

Current Time: Wed Oct 08 13:34:17 PDT 2025

Total time taken to generate the page: 0.00626 seconds