Re: using cgSurface to produce a scatter 3D plot with 4th dimension [message #79512] |
Thu, 08 March 2012 05:54  |
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 #79526 is a reply to message #79513] |
Wed, 07 March 2012 05:19   |
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  |
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?
|
|
|