Is it possible to change the font in LineLegend
? In fact, I need a mathematical font (like Times) in this part.
1 Answer
You can use the option LabelStyle
with suboptions FontFamily
, FontSize
, FontColor
etc to set font properties:
LineLegend[{Red, Green, Blue}, {"red", "green", "blue"},
LegendLabel -> Style["legend", FontFamily -> "Arial", 32, Black],
LabelStyle -> {FontFamily -> "Times New Roman", FontSize -> 24,
FontColor -> Purple, FontSlant -> Italic, FontWeight -> "Heavy"}]
For the options FontSize
, FontColor
, FontSlant
, FontWeight
, Wolfram language is able to infer the associated option if you provide only the values of these options:
LineLegend[{Red, Green, Blue}, {"red", "green", "blue"},
LegendLabel -> Style["legend", FontFamily -> "Arial", 32, Black],
LabelStyle -> {FontFamily -> "Times New Roman", 24, Purple, Italic, Bold}]
same picture