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 #37214 is a reply to message #37208] Tue, 25 November 2003 20:01 Go to previous messageGo to previous message
Chris Torrence is currently offline  Chris Torrence
Messages: 5
Registered: March 2001
Junior Member
Hi,

One further point. If you are interested in simply doing things with iTools
from the command line (rather than creating your own iTool), there are some
good examples in the <IDL_DIR>/examples/demo/demosrc directory.

Specifically, I would look at d_icontour, d_icurvefit, and d_iimage. As an
example, here is the code from d_icurvefit:

; Generate a plot line
n = 50
x = (findgen(n) - 25)/2
yerr = 0.1
y = 2 + 0.1*x + 3*exp(-((x - 1)/2)^2) + yerr*randomn(1,n)
yerror = replicate(yerr, n)

IPLOT, x, y, $
COLOR = [255,0,0], $
ERRORBAR_COLOR = [255,0,0], $
THICK = 2, $
LINESTYLE = 6, $
NAME = 'Gaussian+Linear', $
SYM_INDEX = 4, $
XTITLE = 'Angle !9F!X (degrees)', $
YTITLE = 'Area (m!u2!n)', $
YERROR = yerror, $
/NO_SAVEPROMPT

oSys = _IDLitSys_GetSystem()
oTool = oSys->_GetCurrentTool()
void = oTool->DoAction('Operations/Operations/Filter/Curve Fitting')
oWin = oTool->GetCurrentWindow()
oWin->ClearSelections
void = oTool->DoAction('Operations/Insert/Legend')

This example starts up an iPlot, then fires up the Curve Fitting operation,
and then automatically inserts a legend once the user has hit OK on the
Curve Fit dialog.

With the combination of "DoSetProperty" (see previous post) and "DoAction",
you can perform almost any "interactive" operation directly from the command
line.

-Chris
[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: Fri Oct 10 23:52:33 PDT 2025

Total time taken to generate the page: 1.27791 seconds