I would like to add the label "Omega" on top of the lateral bar in my density plot, like this (I did it using paint):
I spent hours on the documentation, but I didn't find how to obtain such a trivial thing...
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityClear["Global`*"]
Explicitly specify the PlotLegend
as a BarLegend
then you can use the option LegendLabel
DensityPlot[Sin[x] Sin[y],
{x, -4, 4}, {y, -3, 3},
PlotLegends -> BarLegend[Automatic, LegendLabel -> "Omega"]]
PlotLegends -> BarLegend[Automatic, LegendLabel -> "Omega"]
? $\endgroup$DensityPlot[Sin[x] Sin[y], {x, -4, 4}, {y, -3, 3} , ColorFunction -> "Rainbow" , PlotLegends -> Placed[BarLegend[{"Rainbow", {0, 3}} , LegendLabel -> Style["Omega", Bold, 12]] , {1.05, 0.5} ] ]
$\endgroup$