From: Ying-Tsao on
i use
pie([900 600 7000],{'a','b','c'})
but
the data percent will be replace with a,b,c
can i plot with data name and data percent ,
without use 'legend'.

thanks a lot
From: Branko on
"Ying-Tsao " <pinewolf(a)xuite.net> wrote in message <hbp0ns$5ie$1(a)fred.mathworks.com>...
> i use
> pie([900 600 7000],{'a','b','c'})
> but
> the data percent will be replace with a,b,c
> can i plot with data name and data percent ,
> without use 'legend'.
>
> thanks a lot


One possible solution:

A=[900 600 7000];
pie(A,{['a ',num2str(round(100*(A(1)/sum(A)))),'%'],['b ',num2str(round(100*(A(2)/sum(A)))),'%'],...
['c ',num2str(round(100*(A(3)/sum(A)))),'%']});

Branko