Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

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

Search the Archive

Re: Setting the Font Family and Font Size in BoxWhiskerChart

  • To: mathgroup at smc.vnet.net
  • Subject: [mg131053] Re: Setting the Font Family and Font Size in BoxWhiskerChart
  • From: "djmpark" <djmpark at comcast.net>
  • Date: Thu, 6 Jun 2013 07:30:48 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <23185873.4898.1370417584289.JavaMail.root@m06>

Use BaseStyle for ticks and regular plot labels.

BoxWhiskerChart[RandomVariate[NormalDistribution[0, 1], 100],
 BaseStyle -> {FontFamily -> "Palatino", FontSize -> 18},
 PlotLabel -> "Using BaseStyle for Font"]

If you also want to control the font in the Tooltip you will have to define
a LabelingFunction.

dataTooltip[data_] :=
 Module[{names = {"Max", "75%", "Median", "25%", "Min"}, values},
  values = {Max, Quantile[#, 3/4] &, Median, Quantile[#, 1/4] &, Min}[
     data] // Through;
  Grid[Transpose[{names, values}],
   Alignment -> {{Center, "."}, Automatic},
   Dividers -> All,
   Frame -> True]
  ] 

BoxWhiskerChart[RandomVariate[NormalDistribution[0, 1], 100],
 LabelingFunction -> (Placed[
     Style[dataTooltip[#], 18, FontFamily -> "Palatino"], Tooltip] &),
 BaseStyle -> {FontFamily -> "Palatino", FontSize -> 18},
 PlotLabel -> "Plot and Tooltip Fonts"] 

Not used here but the Presentations Application has a BoxWhiskerDraw
primitive so you can easily combine BoxWhisker elements with other
primitives and rotate/translate them to any desired locations.


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





From: Gregory Lypny [mailto:gregory.lypny at videotron.ca] 


Hello everyone,

How can I change the font in a BoxWhiskerChart to Palatino?

Gregory




  • Prev by Date: Re: Adding value to some elements of a list
  • Next by Date: Re: fyi, making animation into PDF file from images genenerated by Mathematica
  • Previous by thread: Re: Setting the Font Family and Font Size in BoxWhiskerChart
  • Next by thread: Re: Setting the Font Family and Font Size in BoxWhiskerChart