Pie chart percentages are not correct
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
kcl128
am 1 Jul. 2016
Kommentiert: kcl128
am 2 Jul. 2016
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.
1 Kommentar
Akzeptierte Antwort
Chad Greene
am 1 Jul. 2016
If
z = [20318 28008]
then the first value, 20318 represents 42% of the total value of z.
100*20318/sum(z)
= 42%
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Pie Charts finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!