4D plot using 3D array
3 views (last 30 days)
Show older comments
Hey!
I have an 128x128x128 array C(128,128,128) filled with positive integers. I need to make a 3D scatter plot, where my array indices (i,j,k) will correspond to x,y,z coordinates and the value of each array element C(i,j,k) will determine its corresponding point colour. Any ideas on how I can accomplish that?
0 Comments
Accepted Answer
Sean de Wolski
on 8 Sep 2014
I would use slice() (or maybe an isosurface) to slice it across various planes. A 3d scatter plot that size will look like a cubic blob.
3 Comments
Sean de Wolski
on 8 Sep 2014
In that case:
[xx,yy,zz] = meshgrid(1:128); % build grid
scatter3(xx(:),yy(:),zz(:),C(:))
More Answers (0)
See Also
Categories
Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!