Re: System Variable Behavior Changed in IDL 6.0 [message #38610 is a reply to message #38488] |
Thu, 11 March 2004 15:10   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> Here is the same sequence of commands in IDL 6.0. No updating of
> the system variables. :-(
>
> IDL> print, !Version
> { x86 Win32 Windows Microsoft Windows 6.0 Jun 27 2003 32 64}
> IDL> !P.Multi=[0,2,3]
> IDL> plot, findgen(11)
> IDL> print, !X.Window[0], !Y.Window[0], !X.Window[1], !Y.Window[1]
> 0.150000 0.125000 0.950000 0.950000
> IDL> plot, findgen(11)
> IDL> print, !X.Window[0], !Y.Window[0], !X.Window[1], !Y.Window[1]
> 0.150000 0.125000 0.950000 0.950000
Ok, this turns out to be my fault, sorta. :-)
This kind of problem happens when you have !P.Position
set to some value:
!P.Position = [0.15, 0.125, 0.95, 0.95]
If this is the case, !P.MULTI gets confused, etc., etc.
I happen to know this.
In my case, I inherited some code that sets !P.Position,
and all I am trying to do it set is back to its *default*
value. But, alas, there is no way, as far as I know, to
set !P.Position to its default value!!
Let's start at the beginning. What *is* its default value?
We start a fresh IDL session to find out:
IDL> Help, !P.Position
<Expression> FLOAT = Array[4]
IDL> Print, !P.Position
0.000000 0.000000 0.000000 0.000000
Ok, so now we change it to something:
IDL> !P.Position = [0.15, 0.125, 0.95, 0.95]
And we are done with it, so we change it back:
IDL> !P.Position = FltArr(4)
All well and good, until we go to plot something:
IDL> Plot, findgen(11)
Oh, oh! :-(
IDL is apparently going to make me set it to *something*
to get my plots to look right again, but if I do, all
my !P.MULTI plots are shot to hell.
Anybody have any bright ideas?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|