Pie chart percentages are not correct
6 次查看(过去 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!