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

Home » Public Forums » archive » Re: 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 #5510 is a reply to message #5504] Wed, 17 January 1996 00:00 Go to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
kunstman@pu.informatik.th-darmstadt.de (Thomas Kunstmann) wrote:
> 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.

How about the following to plot sin(x) over 0 to 2*pi radians:

xmin = 0.0
xmax = 2.0 * !pi
n = 1000
x = ( findgen( n ) / float( n - 1 ) ) * ( xmax - xmin ) + xmin
plot, x, sin(x)

Use as many points (n) as you like to make a smooth curve.

Cheers,
Liam.
[Message index]
 
Read Message
Read Message
Previous Topic: Glitch in TRIGRID using grid spacing
Next Topic: Re: Font Creation

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

Current Time: Sat Oct 11 17:05:52 PDT 2025

Total time taken to generate the page: 0.64092 seconds