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?

 Akzeptierte Antwort

Sean de Wolski
Sean de Wolski am 8 Sep. 2014

0 Stimmen

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 Kommentare

Andriana
Andriana am 8 Sep. 2014
I kind of want it to look like a cubic blob, as I'm working on a cellular automaton problem. I need to have a look at my data as a whole.
In that case:
[xx,yy,zz] = meshgrid(1:128); % build grid
scatter3(xx(:),yy(:),zz(:),C(:))
Andriana
Andriana am 8 Sep. 2014
thank you!I almost got what I wanted! :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by