Pie chart percentages are not correct
조회 수: 4 (최근 30일)
이전 댓글 표시
I am plotting two variables (c and e) into a pie chart. The calculated percentage is 73% but the chart shows 42%. The percentages appear correct for lower values. I attach the code, the variables, the percentage calculation and the pie chart. I have cleared the variables before running the code.
Any advice most welcome.
Thank you.
채택된 답변
Chad Greene
2016년 7월 1일
If
z = [20318 28008]
then the first value, 20318 represents 42% of the total value of z.
100*20318/sum(z)
= 42%
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Pie Charts에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!