How to insert both value and percentage in pie chart?
Mostra commenti meno recenti
Dear all,
I just want to know how to insert in the same pie chart the values that comprise the already presented percentage?
This is the code
figure
xe=[5, 20, 15];
explode=[ 1 0 1];
pe=pie(xe, explode);
%%%% tagging
pText = findobj(pe,'Type','text');
percentValues = get(pText,'String');
txt = {'Geothermal: '; 'PV: '; 'EVs: '};
combinedtxt = strcat(txt,percentValues);
%%%%Set text
pText(1).String = combinedtxt(1);
pText(2).String = combinedtxt(2);
pText(3).String = combinedtxt(3);
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Pie Charts 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!
