how to set color in plot
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Walter Roberson
2013년 4월 2일
PointSize = 10;
scatter3(structure(:), noise(:), diversity(:), PointSize, visualcomplexity(:))
댓글 수: 3
Walter Roberson
2013년 4월 3일
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(:), :) );
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!