How to combine several pulled out slices in a pie plot?

3 ビュー (過去 30 日間)
Kyle
Kyle 2014 年 11 月 20 日
コメント済み: Kyle 2014 年 11 月 20 日
for example i have a data set x = [0.1 0.2 0.2 0.3 0.2]
in a pie plot (5 slices), I want to pull out the 1st, 2nd, 4th and 5th slices, meanwhile joining 1st and 2nd, 4th and 5th slices.
I'm using matlab 2014a, please suggest how should I do.
Many thanks, Kyle

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 11 月 20 日
A = [1 3 5 7 2 4 9 3; 2 2 7 5 3 8 10 2]
s=unique(A)
for k=1:numel(s)
b=any(ismember(A,s(k)))
out{k,1}=s(k)
out{k,2}=setdiff(unique(A(:,b)),s(k))
end
  1 件のコメント
Kyle
Kyle 2014 年 11 月 20 日
Hi Azzi, sorry I did not get your answer, could you please explain a bit more? many thanks.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangePie Charts についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by