Using CData and 'Filled' with Scatter3
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I have a newbie question. I need to make some 3D scatter plots and I am importing the data from MS excel. I am using the CData option to color data points by their Z value and this works very well, I just can't figure out how to display the data points filled with their color. Any help is greatly appreciated.
Here is the code:
if true
%%Define data
figure
[x,y,z] = sphere(16);
x=xlsread('BMP2.xls', 1, 'I2:I1003');
y=xlsread('BMP2.xls', 1, 'K2:K1003');
z=xlsread('BMP2.xls', 1, 'G2:G1003');
scatter3(x(:),y(:),z(:),'CData',z(:))
colorbar
end
TIA
Matt
1 comentario
Walter Roberson
el 6 de Jul. de 2012
Why are you assigning values to x, y, z as the output of sphere(), and then overwriting those values as xlread() outputs ?
Have you tried passing the 'filled' option to scatter3() ?
Respuestas (0)
Ver también
Categorías
Más información sobre Scatter Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!