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

Home » Public Forums » archive » plot (x,y,z) triplets as a surface?
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: plot (x,y,z) triplets as a surface? [message #17648 is a reply to message #17584] Thu, 04 November 1999 00:00 Go to previous messageGo to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
David Fanning <davidf@dfanning.com> wrote in message
news:MPG.128a0f352e8e5f8e989937@news.frii.com...
> Andrew (noymer@my-deja.com) writes:
>
>> ...The x,y values ARE evenly
>> spaced but I would STILL like to output the data as triplets. Call
>> me stubborn.
>>
>> Is there any way to read (x,y,z) triplets into IDL and make a
>> surface? Sorry if this is a terrible newbie question.
>
> I've been meaning to write an article about gridding
> data for a SURFACE plot for about 5 years now. This
> question finally pushed me over the edge. You can find
> it here:
>
> http://www.dfanning.com/tips/grid_surface.html

David--That's a very useful article, but Andrew's original post said that
the data ARE evenly spaced.

Andrew--As I understand it you want to read in a series of (x,y,z) triplets
which actually represent vertices in a m x n rectangular array, i.e.
something like this (for m=2, n=3)

0 0 [Z value]
0 1 [Z value]
0 2 [Z value]
1 0 [Z value]
1 1 [Z value]
1 2 [Z value]

and you want to reorganise the data into an X vector (dimensioned [m]), a Y
vector (dimensioned [n]) and a Z array (dimensioned [m,n]) and generate a
surface plot. Can you confirm that this is the problem you are trying to
solve, and indicate which part you are having difficulty with. Is it reading
the data from the file or recovering X, Y and Z? Do you know m and n in
advance? Can you control the order in which the data are written into the
file?

Cheers...

---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield/
National Institute for Water and Atmospheric Research
PO Box 14-901, Wellington, New Zealand
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: point_lun question, Solution
Next Topic: idl emacs question

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

Current Time: Sun Oct 12 12:20:15 PDT 2025

Total time taken to generate the page: 2.39845 seconds