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

Home » Public Forums » archive » Re: problem with TRIANGULATION option in CONTOUR
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 TRIANGULATION option in CONTOUR [message #73048] Sat, 23 October 2010 16:15 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ben Tupper writes:

> You might consider running the points through GRID_INPUT first. I
> really have no idea if that will help in this case, but it often comes
> to the rescue when interpolating.

Yes, that's a good suggestion.

Or, I would try just gridding the data with Triangulate
and Trigrid, and pass the gridded data to Contour.
In other words, don't try to use the TRIANGULATION
keyword. (I have to admit, I had never heard of this
keyword!)

Here are the commands I use to grid irregular data
from a book that will be hot of the press in a month
or so. I get the X and Y vectors that go with the
gridded data from the XGRID and YGRID output
keywords to TriGrid.

Triangulate, lonIrr, latIrr, triangles
gridData = Trigrid(lonIrr, latIrr, dataIrr, $
triangles, NX=41, NY=41, $
XGrid=xgrid, YGrid=ygrid)
Contour, gridData, xgrid, ygrid, /Cell_Fill, $
Levels=levels, Background=FSC_Color('white'),$
Position=[0.125, 0.125, 0.95, 0.80], $
Color=FSC_Color('black'), XStyle=1, YStyle=1, $
C_Colors=Indgen(nlevels)+1

Cheers,

David

P.S. If you want to send the data, I'm always looking
for perverse examples to add to the book! :-)

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Fragile IDL 8 Object Programs
Next Topic: Another Way IDL 8.0 is Fragile

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

Current Time: Thu Oct 09 20:51:24 PDT 2025

Total time taken to generate the page: 0.24414 seconds