MathGroup Archive 2011

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

Search the Archive

Re: Pie Chart - Labeled Input

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120621] Re: Pie Chart - Labeled Input
  • From: Brett Champion <brettc at wolfram.com>
  • Date: Sun, 31 Jul 2011 07:26:37 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201107301002.GAA25415@smc.vnet.net>

On Jul 30, 2011, at 5:02 AM, Don wrote:

> I am trying to generalize the following
> PieChart function where I can programmatically
> change the number of labeled pieces in the pie.
> 
> PieChart[{Labeled[1,"label 1","VerticalCallout"],Labeled[2,"label
> 2","VerticalCallout"],Labeled[3,"label
> 3","VerticalCallout"]},PlotRange->1.5]
> 
> For e.g. given the following three lists, how can one form the input
> that the Pie Chart function above expects?
> 
> lst1 = {1,2,3}
> lst2 =  {"label 1", "label 2", "label 3"}
> lst3 = Table["VerticalCallout", {Length[lst1]}]
> 

The easiest way in this case is to use the ChartLabels option:

PieChart[lst1, ChartLabels -> Placed[lst2, "VerticalCallout"]]

Brett




  • Prev by Date: Re: special iterator
  • Next by Date: Doesn't work in Mathematica 8
  • Previous by thread: Re: Pie Chart - Labeled Input
  • Next by thread: Feature idea (may already be there)