Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4102

Re: Pie Chart - Labeled Input

From Brett Champion <brettc@wolfram.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Pie Chart - Labeled Input
Date 2011-07-31 11:30 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j13edh$568$1@smc.vnet.net> (permalink)
References <201107301002.GAA25415@smc.vnet.net>

Show all headers | View raw


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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Pie Chart - Labeled Input Brett Champion <brettc@wolfram.com> - 2011-07-31 11:30 +0000

csiph-web