Greetings,
I am struggling to plot a 4D array (density at 3D space) and produce a plot like the attached image.
Actually it does not necessarily have to look like the attachment but it must present the data in a clear way. For that purpose I tried to use scatter3 and isosurface without any success. I am not sure if these functions are the right ones. Regarding scatter3(X,Y,Z,S), my problem is that S must be a vector of the same length as X,Y,Z, whereas I want it to be an size(X)*size(Y)*size(Z) array that contains the density values. On the other hand, I managed to draw a surface using:
p = patch(isosurface(x,y,z,density,2))isonormals(x,y,z,density,p)set(p,'FaceColor','blue','EdgeColor','none');daspect([1,1,1])view(3); axis tightcamlight lighting gouraud
The produced plot looks like this:
Yet I didn't find how to draw multiple surfaces with increasing isovalue into the same plot and make them transparent. Is this possible in Matlab? If not is there any other function to plot a 4D array?
Best Answer