Re: Re: Piechart labels Mathematica 7
- To: mathgroup at smc.vnet.net
- Subject: [mg97373] Re: [mg97358] Re: Piechart labels Mathematica 7
- From: "jackie.lu" <jackielu at gmail.com>
- Date: Thu, 12 Mar 2009 02:17:02 -0500 (EST)
- References: <gp7vvh$1fn$1@smc.vnet.net> <200903111009.FAA02758@smc.vnet.net>
Thank you very much Jens! Just a minor typo in the code below which should
be:
Show[DeleteCases[pc, _Text, Infinity],
Graphics[Cases[pc , _Text, Infinity]]]
Another question also - is there a way to have labels shift their positions
to avoid overlapping with other labels?
Thanks to everyone in advance.
-jackie
On Wed, Mar 11, 2009 at 6:09 AM, Jens-Peer Kuska <
kuska at informatik.uni-leipzig.de> wrote:
> 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
> >
> >
>
>
- References:
- Re: Piechart labels Mathematica 7
- From: Jens-Peer Kuska <kuska@informatik.uni-leipzig.de>
- Re: Piechart labels Mathematica 7