plotting a pie chart
Mostra commenti meno recenti
Hi I am Having trouble getting this chart to come up, I want to plot a pie chart showing the name of the country and what piece of the pie it takes up, this is my code so far..
countries= [ US Mexico Canada Cuba Guatemala DominicanRepublic ElSalvador];
pop= [309975000 108396211 34207000 11204000 14377000 10225000 6194000];
total= sum(pop);
percentage= pop/total;
% Create a pie chart with sections 3 and 6 exploded figure;
explode = [0 0 1 0 0 1 0 0];
pie(percentage, explode, countries);
% Add title
title('Populations');
Thank you
1 Commento
AngelsaAtWar
il 10 Apr 2013
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Title in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!