how to set color in plot
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
actually,i try to create a plot that containts three variables (structure, noise, diversity). i use the data that generated from excel. the most important fact is how to set color of the data as in the example image
example data from excel : structure = 0.7; noise = 6; diversity = 14; visual complexity value = 0.4; then, color of data = purpel

4 commentaires
Réponse acceptée
Walter Roberson
le 2 Avr 2013
PointSize = 10;
scatter3(structure(:), noise(:), diversity(:), PointSize, visualcomplexity(:))
3 commentaires
Walter Roberson
le 3 Avr 2013
ccolors = [0 0 1;
1 0 1;
1 0 0];
binedges = [0 3 6 inf];
[counts, binindx] = histc(visualcomplexity, binedges);
scatter3(structure(:), noise(:), diversity(:), PointSize, ccolors(binidx(:), :) );
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Surface and Mesh 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!