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: [mg91986] Re: [mg91954] Label style in PieChart?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Tue, 16 Sep 2008 19:22:43 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

Needs["PieCharts`"]

pct = 21.7;

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

Format the label directly

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

Or change the BaseStyle

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


Bob Hanlon

---- Gordon Robertson <grobertson at bcgsc.ca> wrote: 

=============
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



--

Bob Hanlon



  • Prev by Date: Re: Label style in PieChart?
  • Next by Date: Re: Advanced plotting
  • Previous by thread: Re: Label style in PieChart?
  • Next by thread: One fundamental Gudermannian identity not verified