Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

2 Answers 2

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.