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

Home » Public Forums » archive » Re: iTool Redeux
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: iTool Redeux [message #37216 is a reply to message #37215] Tue, 25 November 2003 15:49 Go to previous message
Chris[2] is currently offline  Chris[2]
Messages: 39
Registered: August 2003
Member
Hi David,

There are a lot of properties that are settable from the command line for
the iTools, including all of the properties for the visualization (such as
color), and many of the axis properties (like xtitle, ytitle, etc.).
However, not all properties were thought to be important enough to include,
such as the visualization layer or the dataspace properties. This may change
in future versions of IDL. Actually, there will be a much simpler way to
control the default values for such properties, which is what your user
probably wants.

That being said, it is straightforward (though not necessarily obvious) to
set the Stretch to Fit from the command line. The following code will do the
trick:

iPlot, randomu(s,10), IDENTIFIER=idTool
; Retrieve the system object. Note that this routine is undocumented
; and may change in future versions.
oSys = _IDLitSys_GetSystem()
oTool = oSys->GetByIdentifier(idTool)
; The easiest way to determine the object identifier is to
; look in the visualization browser and trace thru the hierarchy.
void = oTool->DoSetProperty('WINDOW/VIEW_1/VISUALIZATION LAYER', $
'STRETCH_TO_FIT', 1)
; You can do multiple DoSetProperty calls, and then a final call to
CommitActions
; to bundle all of your SetProperty's into a single Undo/Redo action.
oTool->CommitActions

The only tricky part is the call to _IDLitSys_GetSystem. All of the other
methods are documented.

Cheers,
Chris
Research Systems, Inc.


"David Fanning" <david@dfanning.com> wrote in message
news:MPG.1a2d7304f9483d5298975c@news.frii.com...
> Folks,
>
> As it happens, I had an e-mail this morning from an iTool
> user (not a newsgroup reader, too, it seems) who wanted
> to do the simplest thing with an iPlot. He wants to call
> the iPlot tool from his program and he wants the plot to
> come up in "Stretch To Fit" mode. He does not want to
> have to change this each time from the Visualization
> Browser.
>
> A reasonable request, I'm sure you will agree. Something
> a casual IDL user might think he wants to do. I tried the
> obvious thing:
>
> IDL> iPlot, data, /Shrink_To_Fit
>
> No, good. I read the iPlot documentation. Nothing there.
> I poked around for 20 minutes in the iTool code until
> my frustration level reached the boiling point. Then
> I sent an e-mail to RSI support. How do you do this
> simple thing?
>
> I don't wish to embarrass anyone at RSI by publishing
> the answer. But I do want you to know how serious a
> problem this is. Here is the answer:
>
> "...the only way to do this would be to
> write an iTool program. I believe the Help Index
> under iTools- operating tasks- Example: Creating
> an example (hot link) will bring you to the steps
> you need to look at."
>
> There you go. I estimate I might have an answer for
> the poor chap in 4-6 weeks if I drop everything and
> work on this. I don't know how long it is going to
> take him to figure it out on his own.
>
> Cheers,
>
> David
>
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> 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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Average outline of several contours
Next Topic: itools error

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

Current Time: Sat Oct 11 04:30:01 PDT 2025

Total time taken to generate the page: 4.15817 seconds