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

Home » Public Forums » archive » Plotting functions in IDL
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: Plotting functions in IDL [message #5619 is a reply to message #5513] Fri, 19 January 1996 00:00 Go to previous messageGo to previous message
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <4dgftr$1qr5@rs18.hrz.th-darmstadt.de>, kunstman@pu.informatik.th-darmstadt.de (Thomas Kunstmann) writes:
> What is the best way of plotting a function in IDL? As far as I know,
> it only handles vectors of discrete data and no equations.
>

I think what he is asking is whether IDL can plot "expressions" or "equations"
which are not known at the time a procedure is written, but rather are
determined at run time.

This is indeed possible in IDL, using the EXECUTE function. Here is an example
of an IDL program which does so, and the output of a session using it.

************************************************************
print, 'Enter expression to be plotted'
expression=''
read, expression
t = execute('plot, '+expression+', title=expression')
end
************************************************************

; IDL Version 4.0.1 (vms alpha)
; Journal File for CARS3::RIVERS
; Working directory: USER_DISK:[RIVERS.IDL]
; Date: Fri Jan 19 16:51:12 1996

.run test_plot
;Enter expression to be plotted
; sin(findgen(100)/10.)

The procedure then draws the plot of the user-entered expression.

____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL and color table allocation
Next Topic: Need Help Rendering Picture of Earth with Satellites

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

Current Time: Wed Oct 08 19:21:56 PDT 2025

Total time taken to generate the page: 0.00440 seconds