# Plot a data of four dimension

I have a confusion recently about the visualization of data with four dimension,like as {x,y,z,color}. This is my current solution.

data = Uncompress[FromCharacterCode[Flatten[ImageData[Import["https://i.sstatic.net/s1ZKU.png"],"Byte"]]]];
front = data[[All, 1 ;; 3]];
back = data[[All, 4]];
Graphics3D[Point[front, VertexColors -> Hue /@ Rescale[back]]]


the effect like the picture.

it is not my intention.i want get a cube whose color be determined by the fourth element of the list.

I have an another try like this.

Style[ConvexHullMesh[front]]


the shape is contented to me.But I cannot render it by what I want to.Can anybody help me?

• Something like: 19575?
– Kuba
Commented Apr 25, 2015 at 13:48
• @Kuba,yeah,thk your concern this problem.I have read that some times,but there are two difference,first,the first solution's point is not a face.the scene is same to my first picture. the scond solution 's data isn't a coordinates.so i want to get a new method.
– yode
Commented Apr 25, 2015 at 14:01
• and all my data is the surface of a cube.
– yode
Commented Apr 26, 2015 at 3:47

Graphics3D[{EdgeForm[{}],
GraphicsComplex[front,
MeshCells[DelaunayMesh[front], 2], VertexColors -> Hue /@ back]}]

MeshCoordinates[DelaunayMesh[front]] == front

(*True*)


• MeshCoordinates[front][[1]] is equivalent to front. Commented Apr 27, 2015 at 12:45
• @LLlAMnYP Hi, thanks for pointing out that, that might be a typo here though the same to front, my first try is MeshCoordinates[DelaunayMesh[front]] Commented Apr 27, 2015 at 13:14
• Also with some fiddling it seems that VertexColors->Hue/@(Rescale@back)yield a more meaningful picture. Commented Apr 27, 2015 at 13:27

After version 10.2, we can directly plot it:

ListDensityPlot3D[data, Boxed -> False, AxesOrigin -> {0, 0, 0}]