Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The question seems trivial, but no sign of such thing in reference. Also TicksStyle does not work for labels.

Thanks, Regards

share|improve this question
up vote 8 down vote accepted

Something like this?

BarChart[{{1, 2, 3}, {1, 3, 2}, {5, 2}}, 
 ChartLabels -> {"a", "b", "c"}, 
 BaseStyle -> Directive[FontFamily -> "Zapfino", FontSize -> 16]]


At first glance, the online documentation for BarChart doesn't describe any useful font options, but when you see the phrase "BarChart has the same options as Graphics with the following additions and changes", you realise that you can try the more general options that work for most 2D graphical output in Mathematica. So, although BaseStyle isn't shown in that list (since presumably there are no additions or changes specifically for BarChart), it works OK here.

In the same way, you can use Background to place a colored background behind a chart. It's not specifically listed in the documentation for BarChart, but once you know that Graphics options also apply, it's worth a try. Eventually, you'll be able to remember all the options, or you'll get there by trial and error. In my experience, the documentation probably contains the information you want, but it's not always on the first page you look at.

BarChart[{{1, 2, 3}, {1, 3, 2}},
 ChartLabels -> {"a", "b", "c"}, 
 ChartStyle -> "FruitPunchColors",
 BaseStyle -> Directive[FontFamily -> "Zapfino", FontSize -> 12],
 Background -> LightGray]

another graphic

share|improve this answer
+1 best font choice ever :-) – chris Mar 24 '13 at 16:44
@chris better than Comic Sans at least :) – cormullion Mar 24 '13 at 17:54
@cormullion - or Algerian! – stevenvh Jul 14 '14 at 9:22
@stevenvh Yes! There are very few fonts that end up having their own hate pages on the internet, and I discovered today that Algerian joins that elite group. – cormullion Jul 14 '14 at 10:54

For the specific task of styling BarChart labels I would use Style directly.

When using the BaseStyle option other elements are affected, potentially in undesirable ways, and some directives are not applied to the labels:

BarChart[{{1, 2, 3}, {1, 3, 2}, {5, 2}},
 ChartLabels -> {"a", "b", "c"},
 BaseStyle -> Directive[Red, FontFamily -> "Stencil Std", FontSize -> 16]

Mathematica graphics

As you can see the axis lines are made red, which I did not desire, yet the A B C labels remain black. The style I desired may be produced with a more targeted approach:

lblStyle = Style[#, 16, Red, FontFamily -> "Stencil Std"] &;

BarChart[{{1, 2, 3}, {1, 3, 2}, {5, 2}},
 ChartLabels -> lblStyle /@ {"a", "b", "c"}

Mathematica graphics

If you wish to style the 1 through 5 labels as well that can be done independently with LabelStyle:

BarChart[{{1, 2, 3}, {1, 3, 2}, {5, 2}},
 ChartLabels -> lblStyle /@ {"a", "b", "c"},
 LabelStyle -> {22, Blue, Italic}

Mathematica graphics

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.