MathGroup Archive 2008

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

Search the Archive

Re: Legend text font

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91399] Re: Legend text font
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Wed, 20 Aug 2008 04:04:13 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <g8ea2d$4ec$1@smc.vnet.net>

Joerg Schaber wrote:

> how can I set the font for a legend text?
> 
> I have to use a construct with Showlegend:
> 
> ShowLegend[Show[graphics,BaseStyle->{FontFamily->"Arial",FontSize->16}],Legend]
> 
> The BaseStyle option does not seem to apply for the legend and I didn't 
> find an option to set the font for the legend text.

 From version 6.0 onwards, you can use the directive *Style[]*. See,

http://reference.wolfram.com/mathematica/ref/Style.html

Arguably not the best work of art ever, but this is just an example :)

   ShowLegend[
    Plot[Sin[x], {x, 0, 10}, Filling -> Axis,
     FillingStyle -> {Red, Blue},
     BaseStyle -> {FontFamily -> "Arial",
       FontSize -> 16}], {{{Graphics[{Blue, Disk[{0, 0}, 1]}],
       Style[Sin[x] > 0, FontFamily -> "Courier", Bold,
        FontSize -> Large]}, {Graphics[{Red, Disk[{0, 0}, 1]}],
       Style[Sin[x] < 0, FontFamily -> "Helvetica", Underlined,
      FontSize -> Tiny]}}}]

Regards,
-- Jean-Marc


  • Prev by Date: NURBS Package Available
  • Next by Date: Mathematica and Jaws
  • Previous by thread: Legend text font
  • Next by thread: NDSolve