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

Home » Public Forums » archive » Re: using cgSurface to produce a scatter 3D plot with 4th dimension
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: using cgSurface to produce a scatter 3D plot with 4th dimension [message #79512] Thu, 08 March 2012 05:54 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sebastian Schäfer writes:

> I've read that article before but unfortunately I have never used one
> of those "non-traditional" grafic features before, so programming one
> would be quite time consuming. The fact that you only need two lines
> in gnuplot to do this
>
> set pm3d
> spl "xi2.txt" us 1:2:3:4 w p lc palette
>
> doesn't really help either :)

Humm. I'm pretty sure you only need one in IDL:

Scatter_Surface, x, y, z

Did you try it?

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: using cgSurface to produce a scatter 3D plot with 4th dimension [message #79513 is a reply to message #79512] Thu, 08 March 2012 04:50 Go to previous messageGo to next message
Sebastian Schäfer is currently offline  Sebastian Schäfer
Messages: 7
Registered: March 2012
Junior Member
> This is a program that is just begging to be written.
> Maybe you are the person to write it for us! :-)
>

I've read that article before but unfortunately I have never used one
of those "non-traditional" grafic features before, so programming one
would be quite time consuming. The fact that you only need two lines
in gnuplot to do this

set pm3d
spl "xi2.txt" us 1:2:3:4 w p lc palette

doesn't really help either :)
It would be definitively a VERY nice to have - feature which in IDL,
but I will stick to the gnuplot thing for a while.
Re: using cgSurface to produce a scatter 3D plot with 4th dimension [message #79526 is a reply to message #79513] Wed, 07 March 2012 05:19 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sebastian Schäfer writes:

> I have a datacube like this and two arrays with the values for the 3
> axes
> L1 DOUBLE = Array[100]
> L2 DOUBLE = Array[100]
> SINF DOUBLE = Array[100]
> XI2MAP DOUBLE = Array[100, 100, 100]
>
> I select a number of points using where() and now want to create a 3D
> plot of these points and use the color to represent their value. I
> managed to do this with cgsurf:
>
> ...
>
> that's pretty much how David Fanning explained it in his traditional
> grafics book (pages 185-197). Now I am trying to get this working with
> cgsurface so I can rotate and zoom mi xi2 map. Is this even possible
> with cgsurface since it only accepts the data in 2D?

It is not possible with cgSurface, because that program was
put together for a specific purpose, and displaying a
scatter plot is not it. But, it doesn't take too much
effort to turn cgSurface into something that *can* do
what you want it to do.

In fact, here is an article, and some code at the end of
the article, that should get you started in the right
direction:

http://www.idlcoyote.com/tips/scatter3d.html

The second half of this article deals with the problem you
are facing.

This is a program that is just begging to be written.
Maybe you are the person to write it for us! :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: using cgSurface to produce a scatter 3D plot with 4th dimension [message #79600 is a reply to message #79512] Fri, 09 March 2012 02:39 Go to previous message
Sebastian Schäfer is currently offline  Sebastian Schäfer
Messages: 7
Registered: March 2012
Junior Member
On 8 Mrz., 14:54, David Fanning <n...@idlcoyote.com> wrote:

> Humm. I'm pretty sure you only need one in IDL:
>
>   Scatter_Surface, x, y, z
>
> Did you try it?

I did - but Scatter_Surface only accepts 3 dimensions (e.g. x,y and a
value for each point: z). Unfortunately, I have 4 dimensions: 3
coordinates (x,y,z) and one value for each of these points. What is
missing is the option to use the color of the symbols plotted to
visualize the 4th dimension (like I did with cgSurf) or am I
overlooking something?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: how to extend a vector from size A to size B, (A<B) without "damage" the data in A
Next Topic: type conversion in GPULIB

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

Current Time: Wed Oct 08 11:41:12 PDT 2025

Total time taken to generate the page: 0.20006 seconds