Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Label style in PieChart?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91989] Re: Label style in PieChart?
  • From: "David Park" <djmpark at comcast.net>
  • Date: Tue, 16 Sep 2008 19:23:17 -0400 (EDT)
  • References: <gal3f6$dsb$1@smc.vnet.net>

Gordon,

Use Style on individual items, or BaseStyle for an entire plot.

Needs["PieCharts`"]

pct = 21.7;
pieLab = StringJoin[ToString[pct], "%"];

PieChart[{pct, 100 - pct},
 PieLabels -> {Style[pieLab, 14], ""},
 PieStyle -> {Directive[Darker[Blue], Opacity[0.4]],
   Directive[Gray, Opacity[0.1]]},
 ImageSize -> 200]

PieChart[{pct, 100 - pct},
 PieLabels -> {pieLab, ""},
 PieStyle -> {Directive[Darker[Blue], Opacity[0.4]],
   Directive[Gray, Opacity[0.1]]},
 BaseStyle -> {FontSize -> 14},
 ImageSize -> 200]


-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


"Gordon Robertson" <grobertson at bcgsc.ca> wrote in message 
news:gal3f6$dsb$1 at smc.vnet.net...
> Hello,
>
> I'm using Mathematica 6.0.3 on OSX 10.5. In a PieChart, is it possible
> to control the label font size and family? I routinely control this for
> 'FrameLabel' with ListPLot. But in the following, adding
> 'LabelStyle -> Directive[12, FontFamily -> "Helvetica"]',  does not
> change the '21.7%' label, PieLabelStyle is not valid, PieStyle does
> not accept font information, and I have found nothing information in
> the Help system or on the web for this.
>
> pct = 21.7
>
> pieLab = StringJoin[ToString[pct], "%"]
>
> PieChart[{pct, 100 - pct}, PieLabels -> {pieLab, ""},
> PieStyle -> {Directive[Darker[Blue], Opacity[0.4]], Directive[Gray,
> Opacity[0.1]]}, ImageSize -> 200]
>
> Thank you -
>
> G
> -- 
> Gordon Robertson
> B.C. Cancer Agency Genome Sciences Centre
> Vancouver BC Canada V5Z 4S6
> 604.707.5900 x5416
> www.bcgsc.ca
>
> 



  • Prev by Date: Functional Programming?
  • Next by Date: Re: Label style in PieChart?
  • Previous by thread: Re: Label style in PieChart?
  • Next by thread: Re: Label style in PieChart?