Pie Chart overlapping Labels

3 ビュー (過去 30 日間)
Abdulaziz
Abdulaziz 2013 年 6 月 5 日
Guys need help pleas,
I have some issues with pie chart. 1. The labels are very close to each other 2. the numbers that less than 1% like 0.02% will show as <1%
Also is there any way to write the percentage under the text and can I set the pie color to be ranged between black and white.
The code is
clear all clc X=[ 20 300 8 120 960 120 180 60 2400 60 320]; explode=[ 0 0 0 0 0 0 0 0 0 0 0]; h=pie(X,explode); colormap jet textObjs = findobj(h,'Type','text'); oldStr = get(textObjs,{'String'}); val = get(textObjs,{'Extent'}); oldExt = cat(1,val{:}); Names = {'Plastic material';'Pump ';'rube-base unit'.... ;'composite tank';'Crank-Shaft digested';'Steel PSA unit';'Turbines compressor Comp1';'Macerator '.... ;'Turbines compressor Comp2';'HeatingCoile storage facility ';'Auxiliary loads'};
newStr = strcat(Names,oldStr);
set(textObjs,{'String'},newStr);

回答 (0 件)

カテゴリ

Help Center および File ExchangePie Charts についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by