Re: Piechart labels Mathematica 7
- To: mathgroup at smc.vnet.net
- Subject: [mg97358] Re: Piechart labels Mathematica 7
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Wed, 11 Mar 2009 05:09:04 -0500 (EST)
- Organization: Uni Leipzig
- References: <gp7vvh$1fn$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi, varAFreq = {{"Alive", 41169}, {"Dead", 1916}, {"Missing", 2009}}; pc = PieChart[varAFreq[[All, 2]], ImageSize -> Medium, ChartStyle -> {LightGreen, Red, LightRed}, PlotLabel -> Column[{Style["Phase I Trees", Bold, 14], Style[Row[{" (", NumberForm[Total[varAFreq[[All, 2]]], DigitBlock -> 3], " trees surveyed)"}], Italic, 14]}], ChartLabels -> Placed[N[varAFreq[[All, 2]]/Total[varAFreq[[All, 2]]]*100] "%", "RadialCallout", Style[NumberForm[#, {3, 1}], 12] &], SectorOrigin -> {.5 Pi, -1}, LabelingFunction -> (Placed[ Style[NumberForm[#, DigitBlock -> 3], Italic, 12], "RadialOuter"] &)] and Show[DeleteCases[pc, _Text, Infinity], Graphics[Cases[cc , _Text, Infinity]]] will bring the text labels in front, but destroy the dynamic functionality of the pie chart Regards Jens jackie.lu wrote: > Hello all, > > I'm creating pie charts with sector labels but unfortunately the labels are > partially hidden by the next section of the pie chart because the slice > itself is rather narrow. Is there a way to place labels such that the label > for a narrow slice isn't partially obscured by the next one? I've searched > the documentation and the forum but haven't been able to figure this out. > > This is the code I'm using. > > varAFreq={{"Alive", 41169}, {"Dead", 1916}, {"Missing", 2009}}; > > PieChart[varAFreq[[All, 2]], > ImageSize -> Medium, > ChartStyle -> {LightGreen, Red, LightRed}, > PlotLabel -> > Column[{Style["Phase I Trees", Bold, 14], > Style[Row[{" (", > NumberForm[Total[varAFreq[[All, 2]]], DigitBlock -> 3], > " trees surveyed)"}], Italic, 14]}], > ChartLabels -> > Placed[N[varAFreq[[All, 2]]/Total[varAFreq[[All, 2]]]*100] "%", > "RadialCallout", Style[NumberForm[#, {3, 1}], 12] &], > SectorOrigin -> {.5 Pi, -1}, > LabelingFunction -> (Placed[ > Style[NumberForm[#, DigitBlock -> 3], Italic, 12], > "RadialCenter"] &)] > > Thank you in advance! > -jackie > >
- Follow-Ups:
- Re: Re: Piechart labels Mathematica 7
- From: "jackie.lu" <jackielu@gmail.com>
- Re: Re: Piechart labels Mathematica 7