MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: when draw the piechart,how to write the label outside

  • To: mathgroup at smc.vnet.net
  • Subject: [mg72963] Re: [mg72932] when draw the piechart,how to write the label outside
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 26 Jan 2007 07:38:41 -0500 (EST)
  • Reply-to: hanlonr at cox.net

Needs["Graphics`"];

angle[data_?VectorQ,n_Integer?Positive]:=
    (2Total[Take[data,n-1]]+data[[n]])Pi/Total[data];

data={.2,.3,.1};

pieLabels={"First","Second","Third"};

PieChart[data,PieLabels->None,Epilog->{Table[
          Text[pieLabels[[n]],1.2{Cos[#],Sin[#]}&[angle[data,n]]],
          {n,Length[data]}]}];


Bob Hanlon

---- birch2002 <birch2002 at gmail.com> wrote: 
> if i use PieLabels, the words will be inside of the pie,but when the
> pie is cut into very small one,the word hardly be written inside the
> pie,so how to write the words outside the pie,which function can do
> that,thank you.
> 


  • Prev by Date: Re: How to find the index of a maximal element in a list?
  • Next by Date: Re: 2D interpolation
  • Previous by thread: Re: eps exports with dashes in them (important - to me, anyway)
  • Next by thread: Different results for same integration