답변 (1개)

Raghav
Raghav 2022년 7월 4일

0 개 추천

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

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터 및 File Exchange에서 Pie Charts에 대해 자세히 알아보기

제품

릴리스

R2015a

질문:

2022년 7월 4일

댓글:

2022년 7월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by