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

Home » Public Forums » archive » Re: Problem with Trigrid
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: Problem with Trigrid [message #15311] Fri, 30 April 1999 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Di Li (di@astrosun.tn.cornell.edu) writes:

> My question is quite basic. I am sure someone has figured it out long ago.
> Please give me a clue on this. Thanks!
>
> I have three vectors of numbers, x,y, and z. Although they are regularly
> spaced data points, z=z_i(x_i,y_i) and the distance between x_i and x_i-1 is
> constant, z cannot be used directly by CONTOUR or SURFACE.
>
> The following works:
> Contour, z,x,y,/irregular
> or
> Triangulate, x,y, tr
> Contour, z,x,y,tr
> .
>
> But the following
>
> Triangulate x,y, tr
> Contour,trigird(x,y,z,tr)
> will lose the original coordinate. Say, the x should be [-30,30], but now it
> is [0,50] (how many grid points are there). Other parameter setting like GS,
> Limits, NX, will only affect grid points, but not being able to get back
> original units.

You need to get the vectors that go with the data you
are trying to contour from output keywords to the
TriGrid command. Your code should look more like
this:

Triangulate, x, y, tr
gridData = Trigrid(x, y, z, tr, XGrid=xgrid, YGrid=ygrid)
Contour, gridData, xgrid, ygrid

Cheers,

David

P.S. I looked this up in my book, because I couldn't
remember how to do it either. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155

[Note: This follow-up was e-mailed to the cited author.]
[Message index]
 
Read Message
Previous Topic: playing sound files
Next Topic: Problem with Trigrid

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

Current Time: Sat Oct 11 08:14:39 PDT 2025

Total time taken to generate the page: 1.04274 seconds