Pattern Pie chart plot

11 ビュー (過去 30 日間)
Shariful Islam
Shariful Islam 2022 年 7 月 4 日
コメント済み: Shariful Islam 2022 年 7 月 4 日
Dear Altruist,
How can I create this types of Pie chart in MATLab?

回答 (1 件)

Raghav
Raghav 2022 年 7 月 4 日
You can use the pie() function in MATLAB to make such a piechart. You can use a 'labels' array to label your piechart.
X = [1 5 6 10 13 52];
labels = {'Oceania','South America','North America','Europe','Africa','Asia'};
explode=[1 0 0 0 0 0];
pie(X,explode,labels)
The reason for using explode parameter is to prevent overlap of 'South America' and 'Oceania' label. When a pie slice is <2% of total, then overlap happens in label of that slice with neighbouring slice's label.Put ith value of explode array =1 to offset the ith pie slice, like Oceania in above example.The values I took in 'X' array are by approximation and to understand better you can read the documentation attached below:
  1 件のコメント
Shariful Islam
Shariful Islam 2022 年 7 月 4 日
Thanks @Raghav for your reply. But I want to create such patterens instead of colors in the pie chart. Could you please help me?
Regards,
Shariful

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

カテゴリ

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

製品


リリース

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by