Group Abstract Group Abstract

Message Boards Message Boards

0
|
7.4K Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Plot a density plot in 3D with data points as {x, y, z, F[x,y,z]}?

Posted 6 years ago

Hi,

I have list of data points having elements {x, y, z, F(x, y, z)}, which I want to plot in 3D as density plot. (x, y, z) are the points on a section of surface of sphere in cartesian system and F(x, y, z) is an integer ranging from 0 - 12. Hence the o/p should be a section of spherical surface with colored domains.

ListDensityPlot3D is giving a funky graphic (a 3D section of the sphere) as points on the edge of the spherical surface are joining each other. Could there be a better way to plot this graphic. Attached file has the graphic obtained by ListDensityPlot3D.

Will be thanful for any suggestion.

Attachments:
POSTED BY: S G
3 Replies
Posted 6 years ago

Thanks. I will try this, but why the surface is not continuous here. Would prefer a continuous surface with a blur transition of colors, as is the case with density plots.

POSTED BY: S G
Posted 6 years ago

One way to visualize the different sections is to plot them individually.

X // GroupBy[Last] // Map[Most, #, 2] & // ListPlot3D[#, Mesh -> None] &

enter image description here

POSTED BY: Rohit Namjoshi

Here are some attempts:

val = Interpolation[Union[X] /. {x_, y_, z_, v_} :> {{x, y}, v}];
ListPlot3D[Map[Most, Union[X]], MeshFunctions -> (val[#1, #2] &), 
 Mesh -> {Range[0, 6]}, AxesLabel -> {x, y, z}]
ListDensityPlot[Map[Drop[#, {3}] &, Union[X]], AxesLabel -> {x, y}]
ListContourPlot[Map[Drop[#, {3}] &, Union[X]], AxesLabel -> {x, y}]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard