Using CData and 'Filled' with Scatter3
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Walter Roberson
le 6 Juil 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() ?
Réponses (0)
Voir également
Catégories
En savoir plus sur Scatter Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!