how to draw a 3-D frequency Distribution map with 3 differentlabels?

1 回表示 (過去 30 日間)
Xuehua Wu
Xuehua Wu 2016 年 6 月 1 日
回答済み: Ahmet Cecen 2016 年 6 月 1 日
here is the data(which is attached below):the first column is the first feature,the second column is the second feature,the third column is the labels include 3 labels. hist3 function can only draw 1 labels.like this:
</matlabcentral/answers/uploaded_files/53400/1.jpg> but there are 3 labels. how can I draw them together,like stacked?and with different colors? thanks!

採用された回答

Ahmet Cecen
Ahmet Cecen 2016 年 6 月 1 日
This is a very lazy solution, and there will be some tearing in graphics so you have to move the view around to get it right:
[w,n] = hist3(data);
hist3([data1;data2;data3],n,'FaceColor',[1 0 0]); hold on;
hist3([data1;data2],n,'FaceColor',[0 1 0]);
hist3(data1,n,'FaceColor',[0 0 1]);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by