# Changing font size and style in VectorDensityPlot

I have this:

VectorDensityPlot[{x, -y}, {x, -5, 5}, {y, -5, 5},
PlotLegends -> Automatic]


and want to:

1) Add a label to the column bar legend on the side 2) Change the font size and style to Latin Modern Roman (LaTeX).

I managed to increase the font size with FrameTicks, but not the style. There aren't many examples around with VectorDensityPlot... I found loads for plot alone, but most of them don't work on VectorDensityPlot...

• You should be able to do a lot of this with the BaseStyle option, give that a try. – Jason B. Jun 27 '16 at 22:09

## 2 Answers

To format the plot legend you will have to go beyond PlotLegends -> Automatic. Here is an example of a formatted plot legend.

VectorDensityPlot[{x, -y}, {x, -5, 5}, {y, -5, 5},
PlotLegends ->
BarLegend[Automatic, LegendLabel -> "Cooper Std",
LabelStyle -> {Bold, 16, FontFamily -> "Cooper Std"}]]


To extend m_goldberg's answer, the legend functions (BarLegend, LineLegend, PointLegend, and SwatchLegend) use the plot's LabelStyle, by default. So, you can set the LabelStyle for the entire plot, if you want uniformity, e.g.

VectorDensityPlot[{x, -y}, {x, -5, 5}, {y, -5, 5},
PlotLegends -> BarLegend[Automatic, LegendLabel -> "Cooper Std"],
LabelStyle -> {Bold, 16, FontFamily -> "Cooper Std"}]