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

Home » Public Forums » archive » 3d scatter plot
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: 3D Scatter plot [message #13935 is a reply to message #642] Wed, 23 December 1998 00:00 Go to previous messageGo to previous message
David Borland is currently offline  David Borland
Messages: 6
Registered: December 1998
Junior Member
Hellu,
An easy way of doing this is to include the psym keyword in the plot_3dbox
call. If you include this command with a positive integer between 1and 7 you
will get just the points drawn, if you use a negative integer between -1 and
-7, you will get the points and the lines drawn.
One way of getting a surface plot from x,y,z coordinates is to call
triangulate, which will give you daleany triangles for the object, and then
send that output to trigrid, which does something else to the data, and then
take that output and do a surface plot to it.

Ie. triangulate,image_x,image_y,angles
griddata=trigrid(image_x,image_y,image_z,angles)
surface,griddata

angles is where triangulate stores it's results.

If you want to see what triangulate has done, try this set of commands and it
will draw out the triangles for you.
triangulate,image_x,image_y,angles
for j=0,n_elements(angles[0,*])-1 do begin
t = [angles[*,j],angles[0,j]]
plots,image_x[t],image_y[t],image_z[t],/t3d,color='ff0000'x

A problem with this method is that if you are trying this on a 3D shape, you
will get lines that cross through the shape and make the surface plot look
wrong. I have not figured out how to fix this with built in IDl routines, so
I'm trying to write my own. If anyone knows a better way of doing this part,
I'd love to hear it.

--
David Borland
Electrical Geodesics Inc.
davidbor@cyber-dyne.com


"Patrick V. Ford" wrote:

> I want a 3D display of a set of data point that I have imported from a
> SYLK file. I have extracted from the SYLK structure the X, Y and Z
> coordinates, where each is an array of 117 float. I get close to what I
> want with a plot-3dbox function, but because of the way it is formatted it
> looks like a series of switch-back paths. What I would really like is a
> surface plot, but I failed at my attempt to use these functions. It is
> also obvious that I don't have a clue on how to set the exponential
> parameter in KRIG2D. I know there must be some trivial method to do this
> in IDL.
>
> Thanks in advance.
>
> Patrick Ford, MD
> Baylor College of Medicine
> pford@bcm.tmc.edu
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Anything in IDL like R's Copy to Clipboard As a Metafile?
Next Topic: populating an array

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

Current Time: Wed Oct 08 19:20:32 PDT 2025

Total time taken to generate the page: 0.29759 seconds