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

When using DensityPlot or similar, I want to change the font size of both frame labels and the color bar legend, but I can only get the frame labels to work.

Example:

DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, PlotLegends -> Automatic, 
BaseStyle -> {FontSize -> 30}]

enter image description here

share|improve this question
up vote 3 down vote accepted
labels = Directive[FontSize -> 24, Black, Italic];

DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, 
 PlotLegends -> BarLegend[{"LakeColors", {-1, 1}}, LabelStyle -> labels], 
 LabelStyle -> labels]

enter image description here

share|improve this answer

Here is an example

DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3}, 
    PlotLegends -> BarLegend["LakeColors", 
        LabelStyle -> {FontSize -> 30,     FontFamily -> "Helvetica"}], 
    BaseStyle -> {FontSize -> 30, FontFamily -> "Helvetica"}
]

More information in Mathematica 9 documentation.

share|improve this answer

Your Answer

 
discard

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.