MathGroup Archive 2007

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

Search the Archive

A different font size for each line in PlotLabel

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80195] A different font size for each line in PlotLabel
  • From: tomfabtastic at hotmail.com
  • Date: Tue, 14 Aug 2007 07:14:18 -0400 (EDT)

Hello,

Does anyone know how to use two fonts in a PlotLabel, where the title
spans two lines.  For example:

Needs["BarCharts`"]
BarChart[{1, 2, 3}, PlotLabel -> "Title" <> "\n" <> "Subtitle"]

The above produces a graph where the Title and Subtitle are on
different lines and are the same FontSize.

I would like "Title" to be FontSize -> 20 and "Subtitle" to be
FontSize -> 10 (and to remain on different lines).

If I use the below I get an error because "Title" is no longer a
string.
BarChart[{1, 2, 3}, PlotLabel -> StyleForm["Title", FontSize -> 20] <>
"\n" <> "Subtitle"]

But then if I use ToString, the FontSize goes back to default size:

BarChart[{1, 2, 3}, PlotLabel -> ToString[StyleForm["Title", FontSize -
> 20]] <> "\n" <> "Subtitle"]

Any suggestions would be greatly appreciated.

Thanks,
Tom



  • Prev by Date: Re: FourierTransform of Sign^2 ?
  • Next by Date: plotting fourier amplitude versus frequency
  • Previous by thread: Re: "formatting notebook contents" messages, why so many in Mathematica
  • Next by thread: Re: A different font size for each line in PlotLabel