_EXTRA [message #1785] |
Thu, 27 January 1994 11:09  |
acdmi
Messages: 4 Registered: January 1994
|
Junior Member |
|
|
I have a routine that uses the _EXTRA parameter to pass keywords to the
PLOT command. For some reason PLOT ignores any parameters that include
strings. I am trying to pass a title, but the title isn't displayed.
Examples:
PLOT, x, y, TITLE=1 %Works
PLOT, x, y, TITLE='Hello' %Works
PLOT, x, y, _EXTRA={TITLE:1} %Works
PLOT, x, y, _EXTRA={TITLE:'Hello'} %Fails (plot appears with no title)
Can people try these commands, and tell me if my problem is reproducable.
Anyone have a solution. (I am running AIX on a IBM POWERStation 330).
--
/Amalek/:j Daniel M. Israel
-Deuteronomy, XXV:19 <crdmi@vulcan.giss.nasa.gov>
Goddard Institute of Space Studies
2880 Broadway, New York, NY
|
|
|
Re: _EXTRA [message #1786 is a reply to message #1785] |
Thu, 27 January 1994 13:15   |
ian
Messages: 26 Registered: February 1992
|
Junior Member |
|
|
Word has it that crdmi@vulcan.giss.nasa.gov may have said:
> Examples:
> PLOT, x, y, TITLE=1 %Works
> PLOT, x, y, TITLE='Hello' %Works
> PLOT, x, y, _EXTRA={TITLE:1} %Works
> PLOT, x, y, _EXTRA={TITLE:'Hello'} %Fails (plot appears with no title)
> Can people try these commands, and tell me if my problem is reproducable.
> Anyone have a solution. (I am running AIX on a IBM POWERStation 330).
Hmm. They all work for me. This IDL 3.5.1, running under OS/MP 4.1A.1
on a Solbourne.
+-Ian Novack (Particle Man and Comatose Reader)------ian@gomez.jpl.nasa.gov---+
| "My whole problem is my lips move when Jet Propulsion Lab |
| I think." -- Calvin, after getting slugged Pasadena, CA |
+---Disclaimer: Had this been an actual opinion, it would still be mine.------+
|
|
|
Re: _extra [message #50732 is a reply to message #1785] |
Wed, 11 October 2006 15:26  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Dometz writes:
> Is there a way to extract certain parameters by name from _extra?
You can find the tag or field names in a structure with
TAG_NAMES. So you could check if there was a field
named SPY in the structure, like this:
index = WHERE(TAG_NAMES(_extra) EQ 'SPY', count)
And you could get the value of the SPY keyword like this:
IF count GT 0 THEN spy_value = _Extra.(index)
But, remember, keywords can be shortened to the fewest
number of characters to make them unique keywords, so
if you want to find SPY, you might well have to look
for "S" and "SP", as well as "SPY". Just hope you
don't have to deal with really long keyword names. :-)
Actually, there is a trick that Dave Burridge once
taught me that make this simpler. I probably involves
STREGEX, but I can't for the life of me think what
it was right now. Sorry. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|